2. Creating First Project
(env) (base) rkmishra@RKs-MacBook-Pro djangoproject % django-admin startproject firstproject
(env) (base) rkmishra@RKs-MacBook-Pro studybud % python manage.py runserver
(env) (base) rkmishra@RKs-MacBook-Pro studybud % python manage startaap base
Now inside studybud project [ setting.py]
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'base.apps.BaseConfig'
]
Inside url.py
from django.http import HttpResponse
def home(request):
return HttpResponse('Home Page')
urlpatterns = [
path('admin/', admin.site.urls),
path('', home),
]