Skip to main content

Django

Django is a Python web framework for building secure and maintainable web applications.

What Is Django

Django includes routing, views, templates, an ORM, authentication, admin tools, forms, migrations, and security defaults.

It follows a batteries-included philosophy.

How To Use Django

Create a project, define models, write views, configure URLs, and run migrations.

Basic Example

from django.http import JsonResponse

def health(request):
return JsonResponse({"ok": True})

Common Concepts

  • Models define database tables.
  • Views handle requests.
  • URLs route requests to views.
  • Migrations change database schema.

What To Learn Next

Learn models, views, templates, forms, Django REST Framework, authentication, and deployment.