Skip to content
thesarfo

Note

Creating a Django App

Scaffolding a new Django app with startapp and registering it in INSTALLED_APPS.

views 0

Once you have setup everything on your project and seen the django installed successfully, you can then create an app.

To create an app, you need to make django aware of the app. so go into the settings.py file and in the installed files list, add your app name.

Terminal window
python manage.py startapp playground

The above command creates a django app with the name “playground”

Now that your app has been created, go to your settings.py file and add the app in the installed_apps dictionary.

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'playground'
]