We appreciate your patience while we actively develop and enhance our content for a better experience.
Sample Code
mkdir my-first-django-project cd my-first-django-project python -m venv venv
source venv/bin/activate
pip install Django django-admin startproject myproject cd myproject python manage.py startapp myapp
from django.http import HttpResponse def hello(request): return HttpResponse("Hello, World!")
from django.urls import path from . import views urlpatterns = [ path('hello/', views.hello, name='hello'), ]
from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('', include('myapp.urls')), ]
python manage.py runserver