# myapp/views.pyfromdjango.shortcutsimportget_object_or_404from.modelsimportArticledefarticle_details(request,id):article=get_object_or_404(Article,pk=id)...# Now a user adds this article to his bookmarks.article.set_flag(request.user)...