관리 메뉴

Jun Hyuk Kim's Blog

[2022/12/30] Code Diary(Python coding + django) 본문

Coding Journal

[2022/12/30] Code Diary(Python coding + django)

junhyuk1229 2022. 12. 30. 17:35

Cleaned up the django project and make a table for teacher and students. Fixed errors when correcting tables. Had lots of problems using 'makemigrations' and 'migrate' command from 'manage.py'. Every time a new column was added, an error will happen when using the 'migrate' command and even after I reverted the changes and ran 'makemigrations', the error never went away. That was because the 'makemigrations' command would make a .py file at the 'migrations' folder. When the 'migrate' command is called it looks through the migrations that were not made and applies them in order. So when we revert the changes and run 'makemigrations', the changed migration have to be applied before the reverted migration keeping the error. This can be fixed by just reverting the changes and deleting the migrations that were not made in the 'migrations' folder. I could check the migration progress with the 'showmigrations' command.

Finished adding announcement functions. Basic creation, deletion, updating functions to announcement. Learned about basic security checks.

https://github.com/junhyuk1229/FirstDjangoProject

 

GitHub - junhyuk1229/FirstDjangoProject: First django project to learn basics. Model: School

First django project to learn basics. Model: School - GitHub - junhyuk1229/FirstDjangoProject: First django project to learn basics. Model: School

github.com

 

Added some problem solutions to python github. Reviewed list, tuple, dictionary and the functions.