mirror of
https://github.com/jazzband/django-eav2.git
synced 2026-04-18 14:11:05 +00:00
Added stuff
This commit is contained in:
parent
5444c15c7e
commit
f522655a6c
2 changed files with 8 additions and 1 deletions
|
|
@ -2,7 +2,7 @@ import uuid
|
|||
import re
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.core.exceptions import ValidationError
|
||||
|
||||
class EavSlugField(models.SlugField):
|
||||
|
|
@ -27,3 +27,5 @@ class EavSlugField(models.SlugField):
|
|||
|
||||
# Remove non alphanumeric characters
|
||||
name = re.sub('[^\w]', '', name)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import re
|
||||
from datetime import datetime
|
||||
|
||||
from django.db import models
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
|
@ -60,6 +61,10 @@ class EavAttribute(models.Model):
|
|||
datatype = models.CharField(_(u"data type"), max_length=6,
|
||||
choices=DATATYPE_CHOICES)
|
||||
|
||||
created = models.DateTimeField(default=datetime.now)
|
||||
|
||||
modified = models.DateTimeField(auto_now=True)
|
||||
|
||||
labels = models.ManyToManyField(EavAttributeLabel,
|
||||
verbose_name=_(u"labels"))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue