Django CRUD
Posted on Aug 22nd, 2022
๐ฏ Project: Django Music
Build a CRUD application from scratch. This app should let you catalog your music collection.
- Create
- Read
- Update
- Delete
This is due on Thursday Morning.
๐ Resources
- Database Design Tutorial This is a great short article that is really an intro to databases. It covers some data best practices and explains primary keys, foreign keys, and relationships.
- Django Docs Model Relationships
- Django Docs URLs
- Django Docs Template Language
- Django Docs Making Queries (using the ORM)
- Model field
null=True
-> relevant for database storage - Model field
blank=True
-> relevant for model object validation
๐ถ๐ถ๐ถ Useful for the spicy options:
- Foreign Key to built-in User from DjangoGirls
- Extending the User model (preferred, used in Uptact)
- Uploading Images
Forms
- Working with Forms -> A good place to start for an overview
- What is up with
form.is_valid()
- Validation on a model form
- Form and field validation
- The Forms API -> Details on form object attribute and methods (such as
as_p()
) - Djangoโs CSRF protection