I'll be making a blog website to get used to the flow in Django
- Home page
- Blog page
- Add attributes to the blog
- Add edit blog functionality
- Add CRUD (Create Read Update Delete) operations
-
'many-to-one' relationship in Django is represented by
ForeignKey
Blog
can be accessed throughBlog Entry
, it's foreign key- ex: if
BlogEntry
has a foreign key ofBlog
, thenblog.blogentry_set.all()
is a query of all the blogs entries in blog
-
How to debug a page not loading properly:
- check if the current page has an id
- make sure it is mapped correctly in urls.py
- check if the current page has an id
-
access the child's parent class to modify an attribute BEFORE saving it to the database
-
ERROR FIXED: when using django-heroku, do:
import django_heroku
django_heroku.settings(locals())
-
you DONT need a template for view + url if you delete something
- question: this could work for button functions?
- Implementing web sockets
- CI/CD during production