From: Jan Szejko Date: Wed, 16 May 2018 13:05:29 +0000 (+0200) Subject: add default date in isbn form X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/d2b872dc09415d2a436e825673425d9a82afa034?ds=sidebyside;hp=-c add default date in isbn form --- d2b872dc09415d2a436e825673425d9a82afa034 diff --git a/src/isbn/forms.py b/src/isbn/forms.py index 147be0b52..558cd9aa0 100644 --- a/src/isbn/forms.py +++ b/src/isbn/forms.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from datetime import date from urllib2 import urlopen from django import forms @@ -13,7 +14,7 @@ from librarian.parser import WLDocument class WLISBNForm(forms.Form): platform_url = forms.URLField(label=u'Adres na platformie') - publishing_date = forms.DateField(label=u'Data publikacji') + publishing_date = forms.DateField(label=u'Data publikacji', initial=date.today) def prepare_data(self): platform_url = self.cleaned_data['platform_url']