Django for Designers/CRUD: Difference between revisions

Content added Content deleted
imported>Paulproteus
(Redirect after post everywhere; need to adjust for AJAX)
imported>Paulproteus
(Remove stray = character)
Line 220: Line 220:
tag.bookmarks.add(new_bookmark)
tag.bookmarks.add(new_bookmark)
return redirect(index)
return redirect(index)
= bookmarks = Bookmark.objects.all().order_by('-timestamp')[:10]
bookmarks = Bookmark.objects.all().order_by('-timestamp')[:10]
current_user = request.user
current_user = request.user
form = BookmarkForm(initial={'author': current_user})
form = BookmarkForm(initial={'author': current_user})