summaryrefslogtreecommitdiff
path: root/gstudio/admin
diff options
context:
space:
mode:
Diffstat (limited to 'gstudio/admin')
-rw-r--r--gstudio/admin/attribute_bigintegerfield.py12
-rw-r--r--gstudio/admin/attribute_booleanfield.py11
-rw-r--r--gstudio/admin/attribute_charfield.py12
-rw-r--r--gstudio/admin/attribute_commaseparatedintegerfield.py11
-rw-r--r--gstudio/admin/attribute_datefield.py12
-rw-r--r--gstudio/admin/attribute_datetimefield.py11
-rw-r--r--gstudio/admin/attribute_decimalfield.py11
-rw-r--r--gstudio/admin/attribute_emailfield.py11
-rw-r--r--gstudio/admin/attribute_filefield.py12
-rw-r--r--gstudio/admin/attribute_filepathfield.py13
-rw-r--r--gstudio/admin/attribute_floatfield.py12
-rw-r--r--gstudio/admin/attribute_imagefield.py12
-rw-r--r--gstudio/admin/attribute_integerfield.py12
-rw-r--r--gstudio/admin/attribute_ipaddressfield.py12
-rw-r--r--gstudio/admin/attribute_nullbooleanfield.py12
-rw-r--r--gstudio/admin/attribute_positiveintegerfield.py12
-rw-r--r--gstudio/admin/attribute_textfield.py12
-rw-r--r--gstudio/admin/attribute_timefield.py12
-rw-r--r--gstudio/admin/attribute_urlfield.py12
19 files changed, 187 insertions, 37 deletions
diff --git a/gstudio/admin/attribute_bigintegerfield.py b/gstudio/admin/attribute_bigintegerfield.py
index 277623f8..6e0938cb 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 17c3efe7..e5d29fed 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 6f41aa4e..afa41b7d 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 c3701d94..b09d4d40 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 b62d2ca7..2856d23e 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 74bc7cae..e4de8b9d 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 9c9dd961..b32c760c 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 a69196a5..5fe1af91 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 11b90e40..61a34973 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 c65346d2..cf570a74 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 1563f92d..23ab024d 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 c203e83a..c2005098 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 b98251f0..bfc84598 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 05570fc2..08569661 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 6a4d7f1c..279677d6 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 54fd939c..67bbbf60 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 5ba20f32..3501668c 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 c719082c..0c1c5a03 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 75f9f80a..6f773819 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()
+