fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
baab092
)
Upgrate fnpdjango to 0.2.
author
Radek Czajka
<radekczajka@nowoczesnapolska.org.pl>
Thu, 19 Mar 2015 15:20:10 +0000
(16:20 +0100)
committer
Radek Czajka
<radekczajka@nowoczesnapolska.org.pl>
Thu, 19 Mar 2015 15:20:10 +0000
(16:20 +0100)
apps/catalogue/management/commands/assign_from_redmine.py
patch
|
blob
|
history
apps/catalogue/management/commands/merge_books.py
patch
|
blob
|
history
apps/catalogue/migrations/0003_from_hg.py
patch
|
blob
|
history
apps/catalogue/models/book.py
patch
|
blob
|
history
apps/catalogue/views.py
patch
|
blob
|
history
requirements.txt
patch
|
blob
|
history
diff --git
a/apps/catalogue/management/commands/assign_from_redmine.py
b/apps/catalogue/management/commands/assign_from_redmine.py
index
03c0637
..
31bdc14
100644
(file)
--- a/
apps/catalogue/management/commands/assign_from_redmine.py
+++ b/
apps/catalogue/management/commands/assign_from_redmine.py
@@
-12,7
+12,7
@@
from django.core.management.base import BaseCommand
from django.core.management.color import color_style
from django.db import transaction
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
from catalogue.models import Chunk
@@
-91,7
+91,7
@@
class Command(BaseCommand):
if fname.endswith('.xml'):
fname = fname[:-4]
fname = fname.replace(' ', '_')
if fname.endswith('.xml'):
fname = fname[:-4]
fname = fname.replace(' ', '_')
- fname = slug
hifi
(fname)
+ fname = slug
ify
(fname)
chunks = Chunk.objects.filter(book__slug=fname)
if not chunks:
chunks = Chunk.objects.filter(book__slug=fname)
if not chunks:
diff --git
a/apps/catalogue/management/commands/merge_books.py
b/apps/catalogue/management/commands/merge_books.py
index
62f8381
..
5499d3d
100644
(file)
--- a/
apps/catalogue/management/commands/merge_books.py
+++ b/
apps/catalogue/management/commands/merge_books.py
@@
-8,7
+8,6
@@
from django.core.management.base import BaseCommand
from django.core.management.color import color_style
from django.db import transaction
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 catalogue.models import Book
diff --git
a/apps/catalogue/migrations/0003_from_hg.py
b/apps/catalogue/migrations/0003_from_hg.py
index
c0b4dad
..
e542d50
100644
(file)
--- a/
apps/catalogue/migrations/0003_from_hg.py
+++ b/
apps/catalogue/migrations/0003_from_hg.py
@@
-11,7
+11,7
@@
from south.db import db
from south.v2 import DataMigration
from django.conf import settings
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)
META_REGEX = re.compile(r'\s*<!--\s(.*?)-->', re.DOTALL | re.MULTILINE)
STAGE_TAGS_RE = re.compile(r'^#stage-finished: (.*)$', re.MULTILINE)
@@
-54,7
+54,7
@@
def gallery(slug, text):
except ValueError:
continue
except ValueError:
continue
- gallery = result.get('gallery', slug
hifi
(slug))
+ gallery = result.get('gallery', slug
ify
(slug))
if gallery.startswith('/'):
gallery = os.path.basename(gallery)
if gallery.startswith('/'):
gallery = os.path.basename(gallery)
@@
-68,7
+68,7
@@
def migrate_file_from_hg(orm, fname, entry):
if fname.endswith('.xml'):
fname = fname[:-4]
title = file_to_title(fname)
if fname.endswith('.xml'):
fname = fname[:-4]
title = file_to_title(fname)
- fname = slug
hifi
(fname)
+ fname = slug
ify
(fname)
# create all the needed objects
# what if it already exists?
# create all the needed objects
# what if it already exists?
diff --git
a/apps/catalogue/models/book.py
b/apps/catalogue/models/book.py
index
a30931d
..
e320af7
100755
(executable)
--- a/
apps/catalogue/models/book.py
+++ b/
apps/catalogue/models/book.py
@@
-8,7
+8,7
@@
from django.db import models, transaction
from django.template.loader import render_to_string
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
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
import apiclient
@@
-127,7
+127,7
@@
class Book(models.Model):
if not title:
title = u'część %d' % (i + 1)
if not title:
title = u'część %d' % (i + 1)
- slug = slug
hifi
(title)
+ slug = slug
ify
(title)
if i < book_len:
chunk = instance[i]
if i < book_len:
chunk = instance[i]
@@
-167,7
+167,7
@@
class Book(models.Model):
if titles is not None:
assert len(titles) == len_other
if slugs is None:
if titles is not None:
assert len(titles) == len_other
if slugs is None:
- slugs = [slug
hifi
(t) for t in titles]
+ slugs = [slug
ify
(t) for t in titles]
for i, chunk in enumerate(other):
# move chunk to new book
for i, chunk in enumerate(other):
# move chunk to new book
@@
-220,7
+220,7
@@
class Book(models.Model):
for i in range(len(self), len(other)):
title = u"pusta część %d" % i
for i in range(len(self), len(other)):
title = u"pusta część %d" % i
- chunk = self.add(slug
hifi
(title), title)
+ chunk = self.add(slug
ify
(title), title)
chunk.commit('')
for i in range(len(other)):
chunk.commit('')
for i in range(len(other)):
diff --git
a/apps/catalogue/views.py
b/apps/catalogue/views.py
index
5aeab7a
..
8a96dc6
100644
(file)
--- a/
apps/catalogue/views.py
+++ b/
apps/catalogue/views.py
@@
-144,7
+144,7
@@
def upload(request):
if request.method == "POST":
form = forms.DocumentsUploadForm(request.POST, request.FILES)
if form.is_valid():
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 request.user.is_authenticated():
creator = request.user
@@
-161,7
+161,7
@@
def upload(request):
if filename[-1] == '/':
continue
title = os.path.basename(filename)[:-4]
if filename[-1] == '/':
continue
title = os.path.basename(filename)[:-4]
- slug = slug
hifi
(title)
+ slug = slug
ify
(title)
if not (slug and filename.endswith('.xml')):
skipped_list.append(filename)
elif slug in slugs:
if not (slug and filename.endswith('.xml')):
skipped_list.append(filename)
elif slug in slugs:
diff --git
a/requirements.txt
b/requirements.txt
index
1bc4f09
..
3c82e4d
100644
(file)
--- a/
requirements.txt
+++ b/
requirements.txt
@@
-1,4
+1,4
@@
--i http://py.mdrn.pl:8443/simple
+-i http
s
://py.mdrn.pl:8443/simple
## Python libraries
lxml>=2.2.2
## Python libraries
lxml>=2.2.2
@@
-13,13
+13,14
@@
httplib2 # oauth2 dependency
## Django
Django>=1.6,<1.7
## 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
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
celery>=3.1.12,<3.2
kombu>=3.0,<3.1