Django 3 Create a new Project and a new App

After successful installation of Django 3 we can create our first project.

cd /usr/local/www/django3/
ls -altr
total 8
drwxr-xr-x   2 root  wheel  512 Oct 20 17:15 .
drwxr-xr-x  13 root  wheel  512 Nov  9 11:44 ..
django-admin startproject greenclass
ls -altr
total 12
drwxr-xr-x  13 root  wheel  512 Nov  9 11:44 ..
drwxr-xr-x   3 root  wheel  512 Dec  7 16:02 greenclass
drwxr-xr-x   3 root  wheel  512 Dec  7 16:02 .
cd greenclass ; ls -altr
total 16
-rwxr-xr-x  1 root  wheel  630 Dec  7 16:02 manage.py
drwxr-xr-x  3 root  wheel  512 Dec  7 16:02 .
drwxr-xr-x  2 root  wheel  512 Dec  7 16:02 greenclass
drwxr-xr-x  3 root  wheel  512 Dec  7 16:02 ..
vi greenclass/settings.py
   'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': '....',
        'USER': '...',
        'PASSWORD': '...',
        'HOST': 'localhost',
        'PORT': 5432,
    }

python3.6 manage.py startapp location
ls -altr
-rwxr-xr-x  1 root  wheel  630 Dec  7 16:02 manage.py
drwxr-xr-x  3 root  wheel  512 Dec  7 16:02 ..
drwxr-xr-x  3 root  wheel  512 Dec  7 19:46 greenclass
drwxr-xr-x  4 root  wheel  512 Dec  7 20:23 farmshop
drwxr-xr-x  3 root  wheel  512 Dec 12 19:16 location
drwxr-xr-x  5 root  wheel  512 Dec 12 19:16 .

Published: Dec. 7, 2019

Change Content

The information on this page is user generated content. The content does not claim to be complete or correct.

Everybody is invited to add or change the data. Just click on this link. No login or email is required. Thanks.