Django for Designers/CRUD: Difference between revisions

If the request is AJAX, then return the content
imported>Paulproteus
("New bookmark" => "Bookmark")
imported>Paulproteus
(If the request is AJAX, then return the content)
Line 343:
tag.save()
tag.bookmarks.add(new_bookmark)
returnif render(request, 'bookmark.html', {'bookmark'is_ajax(): new_bookmark})
return render(request, 'bookmark.html', {'bookmark': new_bookmark})
return redirect(index)
else:
bookmarks = Bookmark.objects.all().order_by('-timestamp')[:10]
Anonymous user