@@ -471,6 +475,16 @@ class DataSetAccessRequest(models.Model):
...
@@ -471,6 +475,16 @@ class DataSetAccessRequest(models.Model):
)
)
notification.save()
notification.save()
self.notification=notification
self.notification=notification
# send email to dataset owner
subject=text
message=_(
'A user requested access to your dataset "{}" at {}.'.format(
self.dataset,self.dataset.get_absolute_url()
)
)
email_to=[self.dataset.owner.email]
send_update_email(subject,message,email_to)
models.Model.save(self,*args,**kwargs)
models.Model.save(self,*args,**kwargs)
def__str__(self):
def__str__(self):
...
@@ -503,6 +517,16 @@ class DataSetPublicationRequest(models.Model):
...
@@ -503,6 +517,16 @@ class DataSetPublicationRequest(models.Model):
)
)
notification.save()
notification.save()
self.notification=notification
self.notification=notification
# send email to all curators
subject="[Curation] {}".format(text,)
message=_(
"The dataset {} has been submitted for publication in the category {}:\n\n{}\n\nPlease conduct a technical review of the uploaded data and metadata prior to your decision about the publication.".format(