Django
OS: Ubuntu
Create a user with Sudo permission
Install vs code
Create a virtual environment
Useful commands
sudo code --user-data-dir=/home/mohan/.config/Code/ --no-sandbox --disable-gpu-sandbox
Open terminal upon launching vscode
#Django version
django-admin.py --version
#create a Venv
python3 -m venv djangoapps
#activate the venv
source djangoapps/bin/activate
#install django
pip install django
pip install psycopg
#creating a New Project
django-admin startproject Core .
python manage.py migrate
python manage.py makemigrations
python manage.py runserver
Postgresql
access to user
sudo -u postgres psql
CREATE ROLE mohan;
ALTER ROLE mohan CREATEDB;
ALTER ROLE mohan LOGIN;
\q
Primary settings on settings.py
DEBUG = True
User regsitration, login, password reset page, logout
Accept the domain name/IP range from user
Accept user preferences and keys
OS: Ubuntu
Create a user with Sudo permission
Install vs code
Create a virtual environment
Useful commands
sudo code --user-data-dir=/home/mohan/.config/Code/ --no-sandbox --disable-gpu-sandbox
Open terminal upon launching vscode
#Django version
django-admin.py --version
#create a Venv
python3 -m venv djangoapps
#activate the venv
source djangoapps/bin/activate
#install django
pip install django
pip install psycopg
#creating a New Project
django-admin startproject Core .
python manage.py migrate
python manage.py makemigrations
python manage.py runserver
Postgresql
access to user
sudo -u postgres psql
CREATE ROLE mohan;
ALTER ROLE mohan CREATEDB;
ALTER ROLE mohan LOGIN;
\q
Primary settings on settings.py
DEBUG = True
Databases
Reference:
https://github.com/CryceTruly/trulyexpensesyoutube
Databases
Last updated
Was this helpful?