Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Razzhivin committed Mar 17, 2012
1 parent 50abfd0 commit 6af219e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Binary file modified videopages/locale/ru/LC_MESSAGES/django.mo
Binary file not shown.
8 changes: 6 additions & 2 deletions videopages/locale/ru/LC_MESSAGES/django.po
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-03-14 16:47+0400\n"
"POT-Creation-Date: 2012-03-17 14:04+0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -115,7 +115,11 @@ msgstr "Метки"
msgid "Now you can publish videos"
msgstr "Теперь можете публиковать видео"

#: views/create.py:18
#: views/create.py:27
msgid "Finish existing video page"
msgstr "Завершите начатое"

#: views/create.py:31
msgid "Video page created successfully"
msgstr "Страница с видео создана успешно"

Expand Down
5 changes: 3 additions & 2 deletions videopages/views/create.py
Expand Up @@ -23,10 +23,11 @@ def create_page(request, username):

try:
# find videopage whithout video or title
videopage = VideoPage.objects.get(Q(title='') | Q(author=request.user) & ~Q(pk__in=inner_q))
videopage = VideoPage.not_removed_objects.get(Q(title='') | Q(author=request.user) & ~Q(pk__in=inner_q))
messages.info(request, _("Finish existing video page"))
except ObjectDoesNotExist:
slug = ''.join(random.choice(string.letters) for i in xrange(RANDOM_SLUG_LENGTH))
videopage = VideoPage.objects.create(author=request.user, slug=slug)
messages.info(request, _("Video page created successfully"))

messages.info(request, _("Video page created successfully"))
return redirect('videopages_edit', request.user.username, videopage.slug)

0 comments on commit 6af219e

Please sign in to comment.