diff --git a/www/Makefile b/www/Makefile index ce8234d59b95..63f942c4f789 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1494,6 +1494,7 @@ SUBDIR += py-django-classy-tags SUBDIR += py-django-cms SUBDIR += py-django-crispy-forms + SUBDIR += py-django-datetime-widget SUBDIR += py-django-debug-toolbar SUBDIR += py-django-devel SUBDIR += py-django-dpaste diff --git a/www/py-django-datetime-widget/Makefile b/www/py-django-datetime-widget/Makefile new file mode 100644 index 000000000000..4cbfd0d023c8 --- /dev/null +++ b/www/py-django-datetime-widget/Makefile @@ -0,0 +1,19 @@ +# Created by: Melvyn Sopacua +# $FreeBSD$ + +PORTNAME= django-datetime-widget +PORTVERSION= 0.6 +CATEGORIES= www python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= melvyn@magemana.nl +COMMENT= Simple and clean widget for DateTimeField + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django>0:${PORTSDIR}/www/py-django + +USE_PYTHON= yes +USE_PYDISTUTILS= yes +PYDISTUTILS_AUTOPLIST= yes + +.include diff --git a/www/py-django-datetime-widget/distinfo b/www/py-django-datetime-widget/distinfo new file mode 100644 index 000000000000..121fa7ab5f4c --- /dev/null +++ b/www/py-django-datetime-widget/distinfo @@ -0,0 +1,2 @@ +SHA256 (django-datetime-widget-0.6.tar.gz) = 361aefed56793d11553ae07975814a1b7df87e21a55c9650d2762571981171b2 +SIZE (django-datetime-widget-0.6.tar.gz) = 34292 diff --git a/www/py-django-datetime-widget/files/patch-datetimewidget__widgets.py b/www/py-django-datetime-widget/files/patch-datetimewidget__widgets.py new file mode 100644 index 000000000000..2a9e70e2e7b5 --- /dev/null +++ b/www/py-django-datetime-widget/files/patch-datetimewidget__widgets.py @@ -0,0 +1,20 @@ +diff --git a/datetimewidget/widgets.py b/datetimewidget/widgets.py +index c62930a..3675f0e 100644 +--- datetimewidget/widgets.py.orig ++++ datetimewidget/widgets.py +@@ -131,7 +131,7 @@ class DateTimeWidget(MultiWidget): + ] + try: + D = to_current_timezone(datetime.strptime(date_time[0], self.format)) +- except (ValueError, TypeError), e: ++ except (ValueError, TypeError) as e : + return '' + else: + return D +@@ -181,4 +181,4 @@ class DateTimeWidget(MultiWidget): + }, + js=js + ) +- media = property(_media) +\ No newline at end of file ++ media = property(_media) diff --git a/www/py-django-datetime-widget/pkg-descr b/www/py-django-datetime-widget/pkg-descr new file mode 100644 index 000000000000..a98e8c3024e3 --- /dev/null +++ b/www/py-django-datetime-widget/pkg-descr @@ -0,0 +1,4 @@ +Django-datetime-widget is a simple and clean widget for DateTimeField. +It's based on bootstrap-datepicker by Stefan Petre. + +WWW: https://pypi.python.org/pypi/django-datetime-widget diff --git a/www/py-django-datetime-widget/pkg-message b/www/py-django-datetime-widget/pkg-message new file mode 100644 index 000000000000..239232ae6ea0 --- /dev/null +++ b/www/py-django-datetime-widget/pkg-message @@ -0,0 +1,10 @@ +To use the widget, follow the Basic Configuration at: + +https://github.com/asaglimbeni/django-datetime-widget + +For step 2, you can download bootstrap and host it yourself or insert +the following lines in your pages: + +