Hello Post!

This is my first post, but I don’t want to talk about me, I want to talk about technology, more concretly abut Django. I will post about me in future entries

Collect static

The first time that I created any static file in my project, I thought that it was enough. I was wrong, you have to run the following script to move either the new and modified static files to the path defined in your config file.

python3 manage.py collectstatic --settings "project.settings"

Data base operations

I always forget what are the scripts to migrate any change in database.

  1. Make migration
python manage.py makemigrations <appname>
  1. Migrate from specified point number
python manage.py sqlmigrate <appname> 000x
  1. Check for any problem in your project
python manage.py check
  1. Migrate all changes executing the SQL sentences
python manage.py migrate