from django.core.management.color import color_style
from django.db import transaction
-from fnpdjango.utils.text.slughifi import slughifi
+from slugify import slugify
from catalogue.models import Chunk
if fname.endswith('.xml'):
fname = fname[:-4]
fname = fname.replace(' ', '_')
- fname = slughifi(fname)
+ fname = slugify(fname)
chunks = Chunk.objects.filter(book__slug=fname)
if not chunks:
from django.core.management.color import color_style
from django.db import transaction
-from fnpdjango.utils.text.slughifi import slughifi
from catalogue.models import Book
from south.v2 import DataMigration
from django.conf import settings
-from fnpdjango.utils.text.slughifi import slughifi
+from slugify import slugify
META_REGEX = re.compile(r'\s*<!--\s(.*?)-->', re.DOTALL | re.MULTILINE)
STAGE_TAGS_RE = re.compile(r'^#stage-finished: (.*)$', re.MULTILINE)
except ValueError:
continue
- gallery = result.get('gallery', slughifi(slug))
+ gallery = result.get('gallery', slugify(slug))
if gallery.startswith('/'):
gallery = os.path.basename(gallery)
if fname.endswith('.xml'):
fname = fname[:-4]
title = file_to_title(fname)
- fname = slughifi(fname)
+ fname = slugify(fname)
# create all the needed objects
# what if it already exists?
from django.template.loader import render_to_string
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
-from fnpdjango.utils.text.slughifi import slughifi
+from slugify import slugify
import apiclient
if not title:
title = u'część %d' % (i + 1)
- slug = slughifi(title)
+ slug = slugify(title)
if i < book_len:
chunk = instance[i]
if titles is not None:
assert len(titles) == len_other
if slugs is None:
- slugs = [slughifi(t) for t in titles]
+ slugs = [slugify(t) for t in titles]
for i, chunk in enumerate(other):
# move chunk to new book
for i in range(len(self), len(other)):
title = u"pusta część %d" % i
- chunk = self.add(slughifi(title), title)
+ chunk = self.add(slugify(title), title)
chunk.commit('')
for i in range(len(other)):
if request.method == "POST":
form = forms.DocumentsUploadForm(request.POST, request.FILES)
if form.is_valid():
- from fnpdjango.utils.text.slughifi import slughifi
+ from slugify import slugify
if request.user.is_authenticated():
creator = request.user
if filename[-1] == '/':
continue
title = os.path.basename(filename)[:-4]
- slug = slughifi(title)
+ slug = slugify(title)
if not (slug and filename.endswith('.xml')):
skipped_list.append(filename)
elif slug in slugs:
--i http://py.mdrn.pl:8443/simple
+-i https://py.mdrn.pl:8443/simple
## Python libraries
lxml>=2.2.2
## Django
Django>=1.6,<1.7
-fnpdjango<0.2
+fnpdjango>=0.2,<0.3
django-pipeline>=1.2,<1.3
django_cas>=2.1,<2.2
sorl-thumbnail>=11.09,<12
django-maintenancemode>=0.9
django-pagination
django-gravatar2
+python-slugify
celery>=3.1.12,<3.2
kombu>=3.0,<3.1