# -*- coding: utf-8 -*-
+from datetime import date
from urllib2 import urlopen
from django import forms
from django.utils.translation import ugettext_lazy as _
-from fnpdjango.utils.text.slughifi import slughifi
+from slugify import slugify
from isbn.management.commands.import_onix import UNKNOWN
from isbn.models import ONIXRecord, ISBNPool
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']
return {'role': 'A01', 'name': output_name}
def slug(self):
- return slughifi('fnp %s %s' % (self.cleaned_data['authors'], self.cleaned_data['title']))
+ return slugify('fnp %s %s' % (self.cleaned_data['authors'], self.cleaned_data['title']))
def save(self):
data = {