from django.core.management.color import color_style
from django.db import transaction
-from slughifi import slughifi
+from slugify import slugify
from catalogue.models import Chunk
redmine_csv = REDMINE_CSV
# Start transaction management.
- transaction.commit_unless_managed()
transaction.enter_transaction_management()
- transaction.managed(True)
redakcja_link = re.compile(re.escape(redakcja) + r'([-_.:?&%/a-zA-Z0-9]*)')
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: