Project config - zamaniamin/python GitHub Wiki
INSTALLED_APPS = [
# Django Packages
...
# External Packages
...
# Local apps
'app_name',
]
create a directori in <app_name>/templates/<app_name>
create directory <project_name>/templates
and config TEMPLATES
in settings.py
TEMPLATES = [
{ …
'DIRS': [BASE_DIR / 'templates', ],
… }
]
create a directory in <project_name>/static
and in settings.py
do this:
STATIC_URL = '/static/'
STATICFILES_DIRS = [ BASE_DIR / 'static' ]
STATIC_ROOT = 'static_root'
first install postgresSQL
in your system, then install this package:
pip install psycopg2
now config DATABASE
in settings.py
DATABASE = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': '<dtabase name>',
'USER': 'postgres',
'PASSWORD': 'admin',
'HOST': 'localhost',
'PORT': '5432'
}
}