DEV Community

Discussion on: DJANGO PAGES.... how do you have a home.html as a template? ITS NOT WORKING

 
qosha1 profile image
Quinn

Any time you change the structure of your database you will need to 'makemigrations' (creates a file that tells the DB what to change and how) and then 'migrate' (actually tells the DB to update).
For instance, if you change your 'User' model to now include their birthday as a datetime field, you would need to go through this process to add a column in the user Table to store the birthdays.

Thread Thread
 
yobretyo profile image
Bret

Ok, do I CD into anything or:
./venv/bin/activate
makemigrations

?

Thread Thread
 
qosha1 profile image
Quinn • Edited

just be in the directory that contains your manage.py file.

Then run

python manage.py makemigrations
python manage.py migrate