Example #1
0
def delete(request, article_id):
    article = Article.objects.get(pk=article_id)
    authorize(request.user, 'delete', article)
    now = datetime.datetime.now()
    html = "<html><body>It is now %s.</body></html>" % now
    return HttpResponse(html)
Example #2
0
def create(request):
    authorize(request.user, 'create', Article)
    now = datetime.datetime.now()
    html = "<html><body>It is now %s.</body></html>" % now
    return HttpResponse(html)