Skip to content

Commit

Permalink
fix requirements (+django-fullurl), fix models (chg author username),…
Browse files Browse the repository at this point in the history
… fix site urls (error in case of makemigrations)
  • Loading branch information
l-dfa committed Sep 16, 2018
1 parent 9f15c81 commit 3edc579
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ chardet==3.0.4
colorama==0.3.9
Django==2.0.7
django-concurrency==1.4
django-fullurl==0.5
docutils==0.14
idna==2.7
imagesize==1.0.0
Expand Down
2 changes: 1 addition & 1 deletion rstsite/rstblog/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Author(models.Model):
- username
- '''
username = models.CharField(
'name',
'username',
max_length=SHORT_LEN,
null=True,
blank=True,
Expand Down
9 changes: 6 additions & 3 deletions rstsite/rstsite/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,13 @@

# this to create urls about search articles by categories
# to pass to IndexSitemap in sitemaps section
categories = Category.objects.values_list('name', flat=True)
search_by_category = []
for category in categories:
search_by_category.append(['rstblog:index_category', category[:], 'article',])
try:
categories = Category.objects.values_list('name', flat=True)
for category in categories:
search_by_category.append(['rstblog:index_category', category[:], 'article',])
except:
pass


articles_dict = {
Expand Down

0 comments on commit 3edc579

Please sign in to comment.