aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorjpaetzel <jpaetzel@FreeBSD.org>2011-10-04 01:20:42 +0800
committerjpaetzel <jpaetzel@FreeBSD.org>2011-10-04 01:20:42 +0800
commit1bec346cc07e6d42635d08d7ca216d7771ef0ffc (patch)
tree626f2e3ffa0998512fcdf0289cf4490aa82e9af9 /www
parent7aeaf79d4846da50697ca2f3e1dc2a714ae1f9b4 (diff)
downloadfreebsd-ports-gnome-1bec346cc07e6d42635d08d7ca216d7771ef0ffc.tar.gz
freebsd-ports-gnome-1bec346cc07e6d42635d08d7ca216d7771ef0ffc.tar.zst
freebsd-ports-gnome-1bec346cc07e6d42635d08d7ca216d7771ef0ffc.zip
Update to work with django 1.3.1
Submitted by: delphij Obtained from: FreeNAS SVN repo Sponsored by: iXsystems
Diffstat (limited to 'www')
-rw-r--r--www/py-dojango/Makefile1
-rw-r--r--www/py-dojango/files/patch-dojango__forms__fields.py51
2 files changed, 52 insertions, 0 deletions
diff --git a/www/py-dojango/Makefile b/www/py-dojango/Makefile
index 0b734f263bcd..55a75b184be6 100644
--- a/www/py-dojango/Makefile
+++ b/www/py-dojango/Makefile
@@ -7,6 +7,7 @@
PORTNAME= dojango
PORTVERSION= 0.5.2
+PORTREVISION= 1
CATEGORIES= www python java
MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE}
MASTER_SITE_SUBDIR= ""
diff --git a/www/py-dojango/files/patch-dojango__forms__fields.py b/www/py-dojango/files/patch-dojango__forms__fields.py
new file mode 100644
index 000000000000..5764f2db0735
--- /dev/null
+++ b/www/py-dojango/files/patch-dojango__forms__fields.py
@@ -0,0 +1,51 @@
+--- ./dojango/forms/fields.py.orig 2011-04-14 15:25:02.000000000 -0700
++++ ./dojango/forms/fields.py 2011-09-26 17:14:30.353122595 -0700
+@@ -6,8 +6,7 @@
+ from dojango.util import json_encode
+
+ __all__ = (
+- 'Field', 'DEFAULT_DATE_INPUT_FORMATS', 'DEFAULT_TIME_INPUT_FORMATS', # original django classes
+- 'DEFAULT_DATETIME_INPUT_FORMATS', 'MultiValueField', 'ComboField', # original django classes
++ 'Field', 'MultiValueField', 'ComboField', # original django classes
+ 'DojoFieldMixin', 'CharField', 'ChoiceField', 'TypedChoiceField',
+ 'IntegerField', 'BooleanField', 'FileField', 'ImageField',
+ 'DateField', 'TimeField', 'DateTimeField', 'SplitDateTimeField',
+@@ -74,26 +73,30 @@
+ class ImageField(DojoFieldMixin, fields.ImageField):
+ widget = widgets.FileInput
+
++# also support dojo's default date-string
++dj_settings.DATE_INPUT_FORMATS = tuple(list(dj_settings.DATE_INPUT_FORMATS) + [
++ '%Y-%m-%dT%H:%M', '%Y-%m-%dT%H:%M:%S'
++ ])
++
+ class DateField(DojoFieldMixin, fields.DateField):
+ widget = widgets.DateInput
+
+ def __init__(self, input_formats=None, min_value=None, max_value=None, *args, **kwargs):
+- kwargs['input_formats'] = input_formats or \
+- tuple(list(formats.get_format('DATE_INPUT_FORMATS')) + [
+- '%Y-%m-%dT%H:%M', '%Y-%m-%dT%H:%M:%S' # also support dojo's default date-strings
+- ])
++ kwargs['input_formats'] = input_formats or formats.get_format('DATE_INPUT_FORMATS')
+ self.max_value = max_value
+ self.min_value = min_value
+ super(DateField, self).__init__(*args, **kwargs)
+
++# also support dojo's default date-string
++dj_settings.TIME_INPUT_FORMATS = tuple(list(dj_settings.TIME_INPUT_FORMATS) + [
++ '%Y-%m-%dT%H:%M', '%Y-%m-%dT%H:%M:%S', 'T%H:%M:%S', 'T%H:%M'
++ ])
++
+ class TimeField(DojoFieldMixin, fields.TimeField):
+ widget = widgets.TimeInput
+
+ def __init__(self, input_formats=None, min_value=None, max_value=None, *args, **kwargs):
+- kwargs['input_formats'] = input_formats or \
+- tuple(list(formats.get_format('TIME_INPUT_FORMATS')) + [
+- '%Y-%m-%dT%H:%M', '%Y-%m-%dT%H:%M:%S', 'T%H:%M:%S', 'T%H:%M' # also support dojo's default time-strings
+- ])
++ kwargs['input_formats'] = input_formats or formats.get_format('TIME_INPUT_FORMATS')
+ self.max_value = max_value
+ self.min_value = min_value
+ super(TimeField, self).__init__(*args, **kwargs)