testing-crud-login-drf
Creation of an application in django on music albums
Before
Before you must verify that you have the latest python version downloaded
Start
In your terminal first create a virtual environment
python -m venv env
In windows
env\Scripts\activate.bat
In Unix o MacOS run
source env\Scripts\activate.bat
Run the command
pip install -r requirements.txt
Create an .env file in the same location as the manage.py file
inside the .env file
- DJANGO_SETTINGS_MODULE = 'app.settings'
- DB_ENGINE = 'django.db.backends.postgresql'
- DB_NAME = DATABASE NAME
- DB_USER = NAME USER IN THE DATABASE
- DB_PASSWORD = DATABASE PASSWORD
- DB_HOST = '127.0.0.1'
- DB_PORT = '5432'
After
Run the command to perform the migrations to the database
python manage.py makemigrations core
then run the command
python manage.py migrate
and then run the command
python manage.py runserver
You can see the good practices that I do running the command:
python manage.py test
This is the page
Sign in, Sign up and authentication token
Get started by creating an account
Then authenticate
Add artist, gender, songs and album
Add gender
Get gender
Add artist
Add song
Get song
Add album
Get album
Logout
It is very important to log out you only need to do this.
then press logout