Django CRUD
Posted on Jul 1st, 2022
For this weekend project, keep working with your code buddies from this week. You are welcome to combine groups and join forces if you want to!
๐ฏ 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 Tuesday.
๐ 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