django-admin startproject PROJECTNAME
Navigate to PARENT PROJECT Folder, not child Folder
python manage.py migrate
Run Server
python manage.py runserver
python manage.py startapp APPNAME
Add app(s) to Settings (copy from apps file of new app)
'appname.apps.AppFunctionFromAppsPy',
In applications views file, create View Function(s)
from django.shortcuts import render
from django.shortcuts import render
from django.http import HttpResponse
def indexPageView(request) :
return HttpResponse('Hello World')
def aboutPageView(request) :
return HttpResponse('About Page')
Create a urls file within the APPLICATION directory
from django.urls import path
from .views import *
urlpatterns = [
path("", indexPageView, name="index"),
path("about/", aboutPageView, "about"),
path("routepath/", viewFunctionName, name="name")
]
#<str:targetPost>'
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('appName.urls')),
path('appRoute/', include('appName.urls')),
]