Create a flights app which talks to a database

From MyWiki
Revision as of 18:56, 20 March 2021 by George2 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

django-admin startproject airline
cd airline
code .
python manage.py startapp flights
go into settings.py and add "flights" as an installed app
edit urls.py and add "include" to the import
add the line path("flights/", include("flights.urls")) to urlpatterns
go into flights and create a file urls.py

from django.urls import path
 
from . import views
urlpatterns = [
]