Before starting with the feedback I would like to congratulate you on publishing your first repository. I'm impressed with the minimalistic code that archives exactly what is supposed to do without too many complications.
The model, form, and views are pretty to the point.
Below are some points that I would improve in future projects.
Python
Easiest thing would be following Python conventions. Use Black and Flake8 to guide you. Auto-format your code, it will look much better and there will not be a mixed number of spaces for indentation. Stick to one, maybe 4 is good. Not a mixture of 2,4, and 6.
PEP8 also helps with naming conventions. loginPage -> login_page
Use explicit exception in the except block. except -> except NotFoundError for example.
Try to document your methods using docstrings. It makes it more readable
Django
Class-based views offer better handling for requests.
When you have a model and you want to make CRUD views (create, read, update, delete), using Generic views makes it much easier and provides the same functionality with much less code. You only need to provide the HTML template and the form.
Define verbose_name when defining model fields. They are helpful in the admin panel.
name = models.CharField(max_length=200)
name = models.CharField(verbose_name="user name", max_length=200)
Frontend
As long as you are using Django templates, this current UI looks pretty good. It is actually impressive to have it built from scratch! Good job.
In general, however, you would want to use at least a CSS framework that gives you modern and responsive UI elements for free. A great example is Tailwind.
Going further, you could use a JS framework to build forms and take care of Ajax requests.
Vue.js and axios are worth checking.
One step further would be having a separate project dedicated to the frontend.
Structure
README.md would have simple installation instructions. Especially when this is intended as a university or an open-source project. Both cases would benefit from understanding how to set up the project, knowing its requirements, and simple use cases.
Use .gitignore to exclude python cached files, databases, and others. I just noticed it is there, but the exclusion syntax is not correct.
Stick to a good file naming convention. Mixing caps, lows, dashes, underscores, etc makes it hard to reason about file contents.
Production applications work better with actual databases, prepare the application to be production-ready. Using SQLite DB should be only done in development.
Thanks a lot for your feedback and pointing out my weak points. It's true that I have a long way to go.
I will keep your feedback in mind and keep improving myself.
Thanks again and I appreciate your hard work.
Before starting with the feedback I would like to congratulate you on publishing your first repository. I'm impressed with the minimalistic code that archives exactly what is supposed to do without too many complications.
The model, form, and views are pretty to the point.
Below are some points that I would improve in future projects.
Python
loginPage
->login_page
except
block.except
->except NotFoundError
for example.Django
Frontend
Structure
README.md
would have simple installation instructions. Especially when this is intended as a university or an open-source project. Both cases would benefit from understanding how to set up the project, knowing its requirements, and simple use cases.Use
.gitignore
to exclude python cached files, databases, and others. I just noticed it is there, but the exclusion syntax is not correct.Stick to a good file naming convention. Mixing caps, lows, dashes, underscores, etc makes it hard to reason about file contents.
Production applications work better with actual databases, prepare the application to be production-ready. Using SQLite DB should be only done in development.
Resources