2. Creating First Project

  1. (env) (base) rkmishra@RKs-MacBook-Pro djangoproject % django-admin startproject firstproject

  2. (env) (base) rkmishra@RKs-MacBook-Pro studybud % python manage.py runserver

  3. (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),

]