Home > django-httpstatus

django-httpstatus

Django-httpstatus is a project mainly written in Python, it's free.

HTTP status code and reason phrase for Django

from django.http import HttpResponse
from django_httpstatus import HttpStatus, statuscode

def view1(request):
    return HttpResponse("Hello!", status=statuscode["ok"])

def view2(request):
    return HttpStatus('Created')(
               render_to_response(...)
           )
Previous:BackSpace