Révision 50d024d9
Ajouté par Benjamin Dauvergne il y a plus de 10 ans
wcsinst/wcsinst/admin.py | ||
---|---|---|
28 | 28 |
inlines = [VariablesInline, ApiSecretsInline] |
29 | 29 |
save_as = True |
30 | 30 |
|
31 |
def save_related(self, request, form, formsets, change): |
|
32 |
super(WcsInstanceAdmin, self).save_related(request, form, formsets, change) |
|
33 |
form.instance.notify(not change) |
|
34 |
|
|
31 | 35 |
def get_prepopulated_fields(self, request, obj=None): |
32 | 36 |
if obj: |
33 | 37 |
return {} |
wcsinst/wcsinst/models.py | ||
---|---|---|
81 | 81 |
def save(self, *args, **kwargs): |
82 | 82 |
created = (self.id is None) |
83 | 83 |
super(WcsInstance, self).save(*args, **kwargs) |
84 |
self.notify(created) |
|
85 | 84 |
|
86 | 85 |
class Meta: |
87 | 86 |
verbose_name = _('wcs instance') |
Formats disponibles : Unified diff
admin: notify wcsintd in the Admin.save_related() method