fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
96017ff
)
add default date in isbn form
author
Jan Szejko
<janek37@gmail.com>
Wed, 16 May 2018 13:05:29 +0000
(15:05 +0200)
committer
Jan Szejko
<janek37@gmail.com>
Wed, 16 May 2018 13:05:29 +0000
(15:05 +0200)
src/isbn/forms.py
patch
|
blob
|
history
diff --git
a/src/isbn/forms.py
b/src/isbn/forms.py
index
147be0b
..
558cd9a
100644
(file)
--- a/
src/isbn/forms.py
+++ b/
src/isbn/forms.py
@@
-1,4
+1,5
@@
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
+from datetime import date
from urllib2 import urlopen
from django import forms
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')
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']
def prepare_data(self):
platform_url = self.cleaned_data['platform_url']