Skip to content

Project config

Amin Zamani edited this page Mar 22, 2023 · 8 revisions

Add app to settings.py

INSTALLED_APPS = [
    # Django Packages
    ...

    # External Packages
    ...

    # Local apps
    'app_name',
]

App templates directory

create a directori in <app_name>/templates/<app_name>

Project templates directory

create directory <project_name>/templates and config TEMPLATES in settings.py

TEMPLATES = [
  { …
        'DIRS': [BASE_DIR / 'templates', ],
   … }
]

Static directory

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'

To use PostgresSQL

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'
     }
}

Python

Python Essentials 1 (PCEP)

Introduction to Python and computer programming

Data types, variables, basic I/O operations, and basic operators

Boolean values, conditional execution, loops, lists and list processing, logical and bitwise operations

Clean Code

Algorithms

Django

Django Rest Framework

API

pip

SQLAlchemy

FastAPI

Pytest

TDD

Git

Linux

Docker

Python Testing

Interview Questions

Clone this wiki locally