diff options
author | Anuja <anujag@anujag-Latitude-D630.(none)> | 2012-06-11 10:29:31 +0530 |
---|---|---|
committer | Anuja <anujag@anujag-Latitude-D630.(none)> | 2012-06-11 10:29:31 +0530 |
commit | 8c082e55fb75386b9f85f66bf4bbb4e1e7a03765 (patch) | |
tree | 7623a718917fb9622a87f180449e7faeba4e7b86 /gstudio/admin | |
parent | 8fe8e36c845a39af3925457771a24f4e3a12b86b (diff) | |
download | gnowsys-8c082e55fb75386b9f85f66bf4bbb4e1e7a03765.tar.gz |
Modified Attribute datatype admin classes for dynamically add/change attributes
Diffstat (limited to 'gstudio/admin')
-rw-r--r-- | gstudio/admin/attribute_bigintegerfield.py | 12 | ||||
-rw-r--r-- | gstudio/admin/attribute_booleanfield.py | 11 | ||||
-rw-r--r-- | gstudio/admin/attribute_charfield.py | 12 | ||||
-rw-r--r-- | gstudio/admin/attribute_commaseparatedintegerfield.py | 11 | ||||
-rw-r--r-- | gstudio/admin/attribute_datefield.py | 12 | ||||
-rw-r--r-- | gstudio/admin/attribute_datetimefield.py | 11 | ||||
-rw-r--r-- | gstudio/admin/attribute_decimalfield.py | 11 | ||||
-rw-r--r-- | gstudio/admin/attribute_emailfield.py | 11 | ||||
-rw-r--r-- | gstudio/admin/attribute_filefield.py | 12 | ||||
-rw-r--r-- | gstudio/admin/attribute_filepathfield.py | 13 | ||||
-rw-r--r-- | gstudio/admin/attribute_floatfield.py | 12 | ||||
-rw-r--r-- | gstudio/admin/attribute_imagefield.py | 12 | ||||
-rw-r--r-- | gstudio/admin/attribute_integerfield.py | 12 | ||||
-rw-r--r-- | gstudio/admin/attribute_ipaddressfield.py | 12 | ||||
-rw-r--r-- | gstudio/admin/attribute_nullbooleanfield.py | 12 | ||||
-rw-r--r-- | gstudio/admin/attribute_positiveintegerfield.py | 12 | ||||
-rw-r--r-- | gstudio/admin/attribute_textfield.py | 12 | ||||
-rw-r--r-- | gstudio/admin/attribute_timefield.py | 12 | ||||
-rw-r--r-- | gstudio/admin/attribute_urlfield.py | 12 |
19 files changed, 187 insertions, 37 deletions
diff --git a/gstudio/admin/attribute_bigintegerfield.py b/gstudio/admin/attribute_bigintegerfield.py index 277623f..6e0938c 100644 --- a/gstudio/admin/attribute_bigintegerfield.py +++ b/gstudio/admin/attribute_bigintegerfield.py @@ -2,6 +2,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ from gstudio.settings import GSTUDIO_VERSIONING +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeBigIntegerFieldAdminForm import reversion @@ -10,4 +11,13 @@ if GSTUDIO_VERSIONING == True: else: parent_class = admin.ModelAdmin class AttributeBigIntegerFieldAdmin(parent_class): - pass + + fieldsets=((_('AttributeBigIntegerField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value', )} + def save_model(self, request, attributebigintegerfield, form, change): + attributebigintegerfield.title = attributebigintegerfield.composed_sentence + attributebigintegerfield.slug = slugify(attributebigintegerfield.title) + attributebigintegerfield.save() + diff --git a/gstudio/admin/attribute_booleanfield.py b/gstudio/admin/attribute_booleanfield.py index 17c3efe..e5d29fe 100644 --- a/gstudio/admin/attribute_booleanfield.py +++ b/gstudio/admin/attribute_booleanfield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeBooleanFieldAdminForm from gstudio.settings import GSTUDIO_VERSIONING import reversion @@ -10,4 +10,11 @@ if GSTUDIO_VERSIONING == True: else: parent_class = admin.ModelAdmin class AttributeBooleanFieldAdmin(parent_class): - pass + fieldsets=((_('AttributeBooleanField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value',)} + def save_model(self, request, attributebooleanfield, form, change): + attributebigintegerfield.title = attributeboofield.composed_sentence + attributebigintegerfield.slug = slugify(attributebigintegerfield.title) + attributebigintegerfield.save() diff --git a/gstudio/admin/attribute_charfield.py b/gstudio/admin/attribute_charfield.py index 6f41aa4..afa41b7 100644 --- a/gstudio/admin/attribute_charfield.py +++ b/gstudio/admin/attribute_charfield.py @@ -3,6 +3,7 @@ from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ from gstudio.settings import GSTUDIO_VERSIONING from gstudio.admin.forms import AttributeCharFieldAdminForm +from django.template.defaultfilters import slugify import reversion if GSTUDIO_VERSIONING == True: parent_class = reversion.VersionAdmin @@ -10,5 +11,14 @@ else: parent_class = admin.ModelAdmin class AttributeCharFieldAdmin(parent_class): - pass + fieldsets=((_('AttributeCharField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value',)} + class Media: + js = ("gstudio/js/attribute.js",) + def save_model(self, request, attributecharfield, form, change): + attributecharfield.title = attributecharfield.composed_sentence + attributecharfield.slug = slugify(attributecharfield.title) + attributecharfield.save() diff --git a/gstudio/admin/attribute_commaseparatedintegerfield.py b/gstudio/admin/attribute_commaseparatedintegerfield.py index c3701d9..b09d4d4 100644 --- a/gstudio/admin/attribute_commaseparatedintegerfield.py +++ b/gstudio/admin/attribute_commaseparatedintegerfield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeCommaSeparatedIntegerFieldAdminForm from gstudio.settings import GSTUDIO_VERSIONING import reversion @@ -11,4 +11,11 @@ else: parent_class = admin.ModelAdmin class AttributeCommaSeparatedIntegerFieldAdmin(parent_class): - pass + fieldsets=((_('AttributeCommaSeparatedIntegerField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value',)} + def save_model(self, request, attributecommaseperatedintegerfield, form, change): + attributecommaseperatedintegerfield.title = attributecommaseperatedintegerfield.composed_sentence + attributecommaseperatedintegerfield.slug = slugify(attributecommaseperatedintegerfield.title) + attributecommaseperatedintegerfield.save() diff --git a/gstudio/admin/attribute_datefield.py b/gstudio/admin/attribute_datefield.py index b62d2ca..2856d23 100644 --- a/gstudio/admin/attribute_datefield.py +++ b/gstudio/admin/attribute_datefield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeDateFieldAdminForm from gstudio.settings import GSTUDIO_VERSIONING import reversion @@ -11,4 +11,12 @@ else: parent_class = admin.ModelAdmin class AttributeDateFieldAdmin(parent_class): - pass + fieldsets=((_('AttributeDateField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value',)} + def save_model(self, request, attributedatefield, form, change): + attributedatefield.title = attributedatefield.composed_sentence + attributedatefield.slug = slugify(attributedatefield.title) + attributedatefield.save() + diff --git a/gstudio/admin/attribute_datetimefield.py b/gstudio/admin/attribute_datetimefield.py index 74bc7ca..e4de8b9 100644 --- a/gstudio/admin/attribute_datetimefield.py +++ b/gstudio/admin/attribute_datetimefield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeDateTimeFieldAdminForm from gstudio.settings import GSTUDIO_VERSIONING import reversion @@ -11,4 +11,11 @@ else: parent_class = admin.ModelAdmin class AttributeDateTimeFieldAdmin(parent_class): - pass + fieldsets=((_('AttributeDateTimeField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value', )} + def save_model(self, request, attributedatetimefield, form, change): + attributedatetimefield.title = attributedatetimefield.composed_sentence + attributedatetimefield.slug = slugify(attributedatetimefield.title) + attributedatetimefield.save() diff --git a/gstudio/admin/attribute_decimalfield.py b/gstudio/admin/attribute_decimalfield.py index 9c9dd96..b32c760 100644 --- a/gstudio/admin/attribute_decimalfield.py +++ b/gstudio/admin/attribute_decimalfield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeDecimalFieldAdminForm from gstudio.settings import GSTUDIO_VERSIONING import reversion @@ -11,4 +11,11 @@ else: parent_class = admin.ModelAdmin class AttributeDecimalFieldAdmin(parent_class): - pass + fieldsets=((_('AttributeDecimalField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value',)} + def save_model(self, request, attributedecimalfield, form, change): + attributedecimalfield.title = attributedecimalfield.composed_sentence + attributedecimalfield.slug = slugify(attributedecimalfield.title) + attributedecimalfield.save() diff --git a/gstudio/admin/attribute_emailfield.py b/gstudio/admin/attribute_emailfield.py index a69196a..5fe1af9 100644 --- a/gstudio/admin/attribute_emailfield.py +++ b/gstudio/admin/attribute_emailfield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeEmailFieldAdminForm from gstudio.settings import GSTUDIO_VERSIONING import reversion @@ -11,4 +11,11 @@ else: parent_class = admin.ModelAdmin class AttributeEmailFieldAdmin(parent_class): - pass + fieldsets=((_('AttributEmailField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value', )} + def save_model(self, request, attributeemailfield, form, change): + attributeemailfield.title = attributeemailfield.composed_sentence + attributeemailfield.slug = slugify(attributeemailfield.title) + attributeemailfield.save() diff --git a/gstudio/admin/attribute_filefield.py b/gstudio/admin/attribute_filefield.py index 11b90e4..61a3497 100644 --- a/gstudio/admin/attribute_filefield.py +++ b/gstudio/admin/attribute_filefield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeFileFieldAdminForm from gstudio.settings import GSTUDIO_VERSIONING import reversion @@ -11,4 +11,12 @@ else: parent_class = admin.ModelAdmin class AttributeFileFieldAdmin(parent_class): - pass + fieldsets=((_('AttributeFileField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value', )} + def save_model(self, request, attributefilefield, form, change): + attributefilefield.title = attributefilefield.composed_sentence + attributefilefield.slug = slugify(attributefilefield.title) + attributefilefield.save() + diff --git a/gstudio/admin/attribute_filepathfield.py b/gstudio/admin/attribute_filepathfield.py index c65346d..cf570a7 100644 --- a/gstudio/admin/attribute_filepathfield.py +++ b/gstudio/admin/attribute_filepathfield.py @@ -1,8 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - -from gstudio.admin.forms import AttributeFilePathFieldAdminForm +from django.template.defaultfilters import slugify from gstudio.settings import GSTUDIO_VERSIONING import reversion if GSTUDIO_VERSIONING == True: @@ -11,4 +10,12 @@ else: parent_class = admin.ModelAdmin class AttributeFilePathFieldAdmin(parent_class): - pass + fieldsets=((_('AttributeFilePathField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value', )} + def save_model(self, request, attributefilepathfield, form, change): + attributefilepathfield.title = attributefilepathfield.composed_sentence + attributefilepathfield.slug = slugify(attributefilepathfield.title) + attributefilepathfield.save() + diff --git a/gstudio/admin/attribute_floatfield.py b/gstudio/admin/attribute_floatfield.py index 1563f92..23ab024 100644 --- a/gstudio/admin/attribute_floatfield.py +++ b/gstudio/admin/attribute_floatfield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeFloatFieldAdminForm from gstudio.settings import GSTUDIO_VERSIONING import reversion @@ -11,4 +11,12 @@ else: parent_class = admin.ModelAdmin class AttributeFloatFieldAdmin(parent_class): - pass + fieldsets=((_('AttributeFloatField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value', )} + def save_model(self, request, attributefloatfield, form, change): + attributefloatfield.title = attributefloatfield.composed_sentence + attributefloatfield.slug = slugify(attributefloatfield.title) + attributefloatfield.save() + diff --git a/gstudio/admin/attribute_imagefield.py b/gstudio/admin/attribute_imagefield.py index c203e83..c200509 100644 --- a/gstudio/admin/attribute_imagefield.py +++ b/gstudio/admin/attribute_imagefield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeImageFieldAdminForm from gstudio.settings import GSTUDIO_VERSIONING import reversion @@ -11,4 +11,12 @@ else: parent_class = admin.ModelAdmin class AttributeImageFieldAdmin(parent_class): - pass + fieldsets=((_('AttributeImageField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value', )} + def save_model(self, request, attributeimagefield, form, change): + attributeimagefield.title = attributeimagefield.composed_sentence + attributeimagefield.slug = slugify(attributeimagefield.title) + attributeimagefield.save() + diff --git a/gstudio/admin/attribute_integerfield.py b/gstudio/admin/attribute_integerfield.py index b98251f..bfc8459 100644 --- a/gstudio/admin/attribute_integerfield.py +++ b/gstudio/admin/attribute_integerfield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeIntegerFieldAdminForm from gstudio.settings import GSTUDIO_VERSIONING import reversion @@ -12,4 +12,12 @@ else: class AttributeIntegerFieldAdmin(parent_class): - pass + fieldsets=((_('AttributIntegerField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value', )} + def save_model(self, request, attributeintegerfield, form, change): + attributeintegerfield.title = attributeintegerfield.composed_sentence + attributeintegerfield.slug = slugify(attributeintegerfield.title) + attributeintegerfield.save() + diff --git a/gstudio/admin/attribute_ipaddressfield.py b/gstudio/admin/attribute_ipaddressfield.py index 05570fc..0856966 100644 --- a/gstudio/admin/attribute_ipaddressfield.py +++ b/gstudio/admin/attribute_ipaddressfield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeIPAddressFieldAdminForm from gstudio.settings import GSTUDIO_VERSIONING import reversion @@ -11,4 +11,12 @@ else: parent_class = admin.ModelAdmin class AttributeIPAddressFieldAdmin(parent_class): - pass + fieldsets=((_('AttributeIPAddressField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value', )} + def save_model(self, request, attributeipaddressfield, form, change): + attributeipaddressfield.title = attributeipaddressfield.composed_sentence + attributeipaddressfield.slug = slugify(attributeipaddresfield.title) + attributeipaddressfield.save() + diff --git a/gstudio/admin/attribute_nullbooleanfield.py b/gstudio/admin/attribute_nullbooleanfield.py index 6a4d7f1..279677d 100644 --- a/gstudio/admin/attribute_nullbooleanfield.py +++ b/gstudio/admin/attribute_nullbooleanfield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeNullBooleanFieldAdminForm from gstudio.settings import GSTUDIO_VERSIONING import reversion @@ -11,4 +11,12 @@ else: parent_class = admin.ModelAdmin class AttributeNullBooleanFieldAdmin(parent_class): - pass + fieldsets=((_('AttributeNullBooleanField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value', )} + def save_model(self, request, attributenullbooleanfield, form, change): + attributenullbooleanfield.title = attributenullbooleanfield.composed_sentence + attributenullbooleanfield.slug = slugify(attributenullbooleanfield.title) + attributenullbooleanfield.save() + diff --git a/gstudio/admin/attribute_positiveintegerfield.py b/gstudio/admin/attribute_positiveintegerfield.py index 54fd939..67bbbf6 100644 --- a/gstudio/admin/attribute_positiveintegerfield.py +++ b/gstudio/admin/attribute_positiveintegerfield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributePositiveIntegerFieldAdminForm from gstudio.settings import GSTUDIO_VERSIONING import reversion @@ -11,4 +11,12 @@ else: parent_class = admin.ModelAdmin class AttributePositiveIntegerFieldAdmin(parent_class): - pass + fieldsets=((_('AttributePositiveIntegerField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value', )} + def save_model(self, request, attributepositiveintegerfield, form, change): + attributepositiveintegerfield.title = attributepositiveintegerfield.composed_sentence + attributepositiveintegerfield.slug = slugify(attributepositiveintegerfield.title) + attributepositiveintegerfield.save() + diff --git a/gstudio/admin/attribute_textfield.py b/gstudio/admin/attribute_textfield.py index 5ba20f3..3501668 100644 --- a/gstudio/admin/attribute_textfield.py +++ b/gstudio/admin/attribute_textfield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeTextFieldAdminForm import reversion from gstudio.settings import GSTUDIO_VERSIONING @@ -11,4 +11,12 @@ else: parent_class = admin.ModelAdmin class AttributeTextFieldAdmin(parent_class): - pass + fieldsets=((_('AttributeTextField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value', )} + def save_model(self, request, attributetextfield, form, change): + attributetextfield.title = attributetextfield.composed_sentence + attributetextfield.slug = slugify(attributetextfield.title) + attributetextfield.save() + diff --git a/gstudio/admin/attribute_timefield.py b/gstudio/admin/attribute_timefield.py index c719082..0c1c5a0 100644 --- a/gstudio/admin/attribute_timefield.py +++ b/gstudio/admin/attribute_timefield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeTimeFieldAdminForm import reversion from gstudio.settings import GSTUDIO_VERSIONING @@ -11,4 +11,12 @@ else: parent_class = admin.ModelAdmin class AttributeTimeFieldAdmin(parent_class): - pass + fieldsets=((_('AttributeTimeField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value', )} + def save_model(self, request, attributetimefield, form, change): + attributetimefield.title = attributetimefield.composed_sentence + attributetimefield.slug = slugify(attributetimefield.title) + attributetimefield.save() + diff --git a/gstudio/admin/attribute_urlfield.py b/gstudio/admin/attribute_urlfield.py index 75f9f80..6f77381 100644 --- a/gstudio/admin/attribute_urlfield.py +++ b/gstudio/admin/attribute_urlfield.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.core.urlresolvers import NoReverseMatch from django.utils.translation import ugettext_lazy as _ - +from django.template.defaultfilters import slugify from gstudio.admin.forms import AttributeURLFieldAdminForm import reversion from gstudio.settings import GSTUDIO_VERSIONING @@ -11,4 +11,12 @@ else: parent_class = admin.ModelAdmin class AttributeURLFieldAdmin(parent_class): - pass + fieldsets=((_('AttributeURLField'),{'fields': ('attributetype','attributetype_scope','subject','subject_scope','svalue','value_scope','value')}), + +) + prepopulated_fields = {'svalue': ('value', )} + def save_model(self, request, attributeurlfield, form, change): + attributeurlfield.title = attributeurlfield.composed_sentence + attributeurlfield.slug = slugify(attributeurlfield.title) + attributeurlfield.save() + |