fnp
/
django-migdal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new fields: gallery, time/place for events
[django-migdal.git]
/
migdal
/
fields.py
diff --git
a/migdal/fields.py
b/migdal/fields.py
index
843c44e
..
c9fe7fc
100644
(file)
--- a/
migdal/fields.py
+++ b/
migdal/fields.py
@@
-4,15
+4,16
@@
#
from django.db import models
#
from django.db import models
+
class SlugNullField(models.SlugField):
description = "SlugField that stores NULL instead of blank value."
class SlugNullField(models.SlugField):
description = "SlugField that stores NULL instead of blank value."
- def to_python(self, value
, **kwargs
):
- value = super(SlugNullField, self).to_python(value
, **kwargs
)
+ def to_python(self, value):
+ value = super(SlugNullField, self).to_python(value)
return value if value is not None else u""
def get_prep_value(self, value, **kwargs):
return value if value is not None else u""
def get_prep_value(self, value, **kwargs):
- value = super(SlugNullField, self).get_prep_value(value
, **kwargs
)
+ value = super(SlugNullField, self).get_prep_value(value)
return value or None
return value or None