Creation of an application in django on music albums
Before you must verify that you have the latest python version downloaded
In your terminal first create a virtual environment
python -m venv env
In windows
env\Scripts\activate
In Unix o MacOS run
source env\Scripts\activate
Run the command
pip install -r requirements.txt
Create an .env file in the same location as the manage.py 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'
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
Get started by creating an account
Then authenticate
Add gender
Get gender
Add artist
Add song
Get song
Add album
Get album
It is very important to log out you only need to do this.
then press logout