1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

www/py-django-datetime-widget

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

PR:		191059
Submitted by:	melvyn@magemana.nl
This commit is contained in:
William Grzybowski 2014-08-01 22:04:07 +00:00
parent 9fcd312280
commit 9021e479e9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=363767
6 changed files with 56 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,19 @@
# Created by: Melvyn Sopacua <melvyn@magemana.nl>
# $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 <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (django-datetime-widget-0.6.tar.gz) = 361aefed56793d11553ae07975814a1b7df87e21a55c9650d2762571981171b2
SIZE (django-datetime-widget-0.6.tar.gz) = 34292

View File

@ -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)

View File

@ -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

View File

@ -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:
<link rel="StyleSheet" src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css" type="text/css />
<script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/js/bootstrap.min.js" type="text/javascript></script>