1 | *** __init__.py.old 2009-11-03 14:14:40.000000000 -0500
|
---|
2 | --- __init__.py 2009-11-03 14:15:09.000000000 -0500
|
---|
3 | ***************
|
---|
4 | *** 419,424 ****
|
---|
5 | --- 419,429 ----
|
---|
6 | ugettext_lazy("This field cannot be null."))
|
---|
7 | return smart_unicode(value)
|
---|
8 |
|
---|
9 | + def get_db_prep_value(self, value):
|
---|
10 | + if value is None:
|
---|
11 | + return None
|
---|
12 | + return unicode(value)
|
---|
13 | +
|
---|
14 | def formfield(self, **kwargs):
|
---|
15 | defaults = {'max_length': self.max_length}
|
---|
16 | defaults.update(kwargs)
|
---|
17 | ***************
|
---|
18 | *** 802,807 ****
|
---|
19 | --- 807,817 ----
|
---|
20 | def get_internal_type(self):
|
---|
21 | return "TextField"
|
---|
22 |
|
---|
23 | + def get_db_prep_value(self, value):
|
---|
24 | + if value is None:
|
---|
25 | + return None
|
---|
26 | + return unicode(value)
|
---|
27 | +
|
---|
28 | def formfield(self, **kwargs):
|
---|
29 | defaults = {'widget': forms.Textarea}
|
---|
30 | defaults.update(kwargs)
|
---|