code: def add_bookmark(request):
      
      if request.method == "POST":
          form = BookmarkForm(user=request.user, data=request.POST)
          if form.is_valid():
              bookmark = form.save()
              if not request.is_ajax():
                  messages.success(request, 'Bookmark added')
                  if request.POST.get('next'):
                      return HttpResponseRedirect(request.POST.get('next'))
                  return HttpResponse('Added')
              return render_to_response(
                  'admin_tools/menu/remove_bookmark_form.html',
                  {'bookmark': bookmark, 'url': bookmark.url}
              )
      else:
          form = BookmarkForm(user=request.user)
      return render_to_response(
          'admin_tools/menu/form.html',
          {'form': form, 'title': 'Add Bookmark'}
      )
docs: This view serves and validates a bookmark form.
      If requested via ajax it also returns the drop bookmark form to replace the
      add bookmark form.