๐ Back-end: Deployment and PostgreSQL ๐
Posted on Mar 16th, 2021
Topics
- deploying Django applications to Heroku
- using PostgreSQL
๐ฏ Project: Habit Tracker
Youโll be working on Habit Tracker this week.
Itโs important to read the project requirements thoroughly and start to think about how you would do this project.
First steps: generate the project skeleton, get it deployed to Heroku, and design your models. Make sure to create a diagram showing model fields and relationships. Talk through with each other how you are thinking about this.
By Thursday:
- Your application should be deployed to Heroku
- Your models should be done
- You should be able to create habits and associated daily records in the django shell (I recommend using
shell_plus)
๐ Resources
- Example code: Django Recipes
- Checklist for deploying to Heroku
django-extensionsshell_plus- Momentum Django Project Template
๐ Read | ๐บ Watch | ๐ง Listen
- Full Stack Python: ORMs
- Class-Responsibility-Collaborator Model (CRC)
- Entity Relationship Diagrams (ERD), from Lucid Chart
โก Lightning Talk Topics
You should research these starting in the Django docs (linked below). For this talk, explain your topic and show us a code example. You may find a code example of each of these in the Django Recipes codebase.
Basic outline of your talk (youโre welcome to vary this):
- Define your topic. What is it?
- How does this relate to other things you have learned before? (in other words, can you put it in context for everyone? How does this fit in?)
- Why do we care about this topic? When is it useful? Do you see it as being useful in this weekโs project or another project youโve done in the past?
- How does it work?
- Explain it conceptually.
- Show us some code. The code example should demonstrate how to use it.
- Any thoughts you have about it that you want to share? Tell us what you think.
On Thursday, come prepared to talk for 5-7 minutes on your topic. If there are 2 people on your topic, come prepared to talk for 10-12 minutes.
- Lookup expressions with
.filter()- Tori - Lookups that span relationships - Tristan
- Complex lookups with Q - Dawud
- Queries with Related objects - Mike
- Aggregate & Annotate - Ben and Grant