Momentum logo
Team 10 Classroom

🐻 Models & Queries 🐻

Posted on Nov 30th, 2021

🗓️ Today’s Topics

  • The woes of deployment and what to do about them
  • Django managers, lookups, and querysets
  • Using the Django shell to test out your models and make queries

🎯 Project: Continue Building Habit Tracker

Today you should finalize your models and begin building out the urls, views, and templates you will need. Before you write the code, plan for what you will need.

There are examples for a lot of what you need to do in the Django Recipes codebase but you will have to adapt them to your Habit Tracker use cases.

🔖 Resources

Models

Managers and QuerySets

Queries

You can think of queries as talking to the database. To support all our CRUD actions, we need to be able to create, read, update, and delete objects from the database. Django has a built-in library that lets us do all that.

🌟 EXTRA/TMI

  • SQL Basics: Learn X in Y minutes -> this is a helpful reference for SQL syntax when you run into it. You do not need to write SQL for Django because the Django ORM does it for you, and it does it well. The Django docs often illustrate queries made by the ORM using SQL syntax, however, and you will find it helpful in your job to know the basics.
  • Postgres GUI: Postico

🦉 Code & Notes

🦊 Welcome to Advanced Front End 🦊

Posted on Nov 29th, 2021

⚠️ You only need to read this post if you are in the front end group

⚛ Today’s topics

  • Return to JavaScript!
  • the modern JavaScript ecosystem
  • ES6 features

📖 Read | 📺 Watch | 🎧 Listen

These are required readings, videos, and/or podcasts. Read, watch, or listen, and take notes.

💻 Write Code

Complete at least two exercises from this list on Exercism.io JavaScript Track:

  • Isogram
  • Scrabble Score
  • ETL
  • Simple Cipher
  • Hamming
  • Gigasecond
  • Grade School

👾 optional coding exercise

🔖 Resources

🐻 Welcome to Advanced Back End 🐻

Posted on Nov 29th, 2021

⚠️ You only need to read this post if you are in the back end group

🐍 Today’s Topics

🎯 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; make sure you are using Postgres; deploy 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 tomorrow:

  • Your application should be deployed to Heroku.
  • Your models should be functional.
  • You should be able to create habits and associated daily records in the django shell (I recommend using shell_plus which is available from django-extensions).

📖 Read | 📺 Watch | 🎧 Listen

These are this week’s required readings, videos, and/or podcasts. Read, watch, or listen, and take notes.

Deployment

Databases & Data Modeling

Debugging

🔖 Resources

Phase 3 Head Start 🏁

Posted on Nov 19th, 2021

This is ALL OPTIONAL. Please remember to take time to rest and relax during the break.

✅ TODO for Everyone

  • Reflect on where you are in this program. You’ve learned a lot and you have a lot left to learn. What are YOUR goals? Use this Goals Reflection exercise to re-energize for what’s ahead and focus on what you want to accomplish.
  • Create a schedule that you can stick to for the times you will not be in class (see the time management resources below for some suggestions on managing your time effectively).
  • Learn markdown (more resources listed below)
  • Pick a note-taking application that will let you take notes while you read and work. It’s important that it can properly format code blocks. Here are some options (don’t overthink this choice – just pick something that you feel comfortable with).

🔖 Resources for Everyone

Time Management

Tech Talks with Good Advice

Markdown & Taking Notes


🦊 SO YOU WANT TO BE A FRONT-END DEV

This is all 💯 optional but if you want to keep your learning streak going, here are some relevant readings. Some of this will be covered directly during Phase 3, but not all of it.

A note on terminology

“ES6” stands for “ECMAScript 6”, a version of JavaScript that came out in 2015 (ECMA is the organization that governs JavaScript language standards). When people refer to “ES6”, they usually mean the set of newer features that were introduced to the JavaScript language in that version. It was a major shift and required developers to get used to some really new things. These features are commonplace now, but the “ES6” name has stuck around.

Many of the features introduced in ES6 are important to know for React.

JavaScript & React

👾 If you want to write some code

This is optional. You do not need to submit anything.


🐻 SO YOU WANT TO BE A BACK-END DEV

This is all 💯 optional but if you want to keep your learning streak going, here are some relevant readings. Some of this will be covered directly during Phase 3, but not all of it.

Overview on running production applications

  • 🎧 Deploying and Running Django Web Apps in 2021 podcast
  • The Twelve-Factor App Have you heard of SaaS applications? “Software as a service” is a concept that describes how a lot of modern web applications work. This pretty technical resource is a good (hard) overview that gets into the overlap between development and operational infrastructure (where and how the code runs): DevOps.

Debugging in Python

Databases and SQL

Confidence working with the database is important for back end devs, so it’s worth taking the time to really understand how they work.

We won’t need to write SQL in Phase 3 but it’s a nice add-on for your technical interviews, and it’s a skill you will definitely pick up if your job involves back end work.

Writing Tests

This is the number one skill you should learn after you finish this program. Writing tests is an essential part of development.

👾 If you want to write some code

This is all optional. You do not need to submit anything.


Tags: phase-3 bonus

Django Wrap Up 🎁

Posted on Nov 17th, 2021

🗓️ Today’s Topics

  • Finishing up with code snippets and flashcards
  • End-of-phase technical presentations
  • Q&A about Phase 3

🎯 Django Duplex Project due Thursday @ 2:00 pm

Thursday morning we will not have class. You should use that time to finish work on your project. Amy will be available during regular class hours to help out with whatever assorted issues are happening.

🤩 End-of-Phase Presentations Thursday @ 2:00 pm

Each person has 4-5 min to talk about one of the following topics using examples from your own code. This should be code that you personally wrote, at least most of it, giving credit to teammates where it’s due.

Topics: Pick one

  1. Pick a url, view, and template that you worked on. Walk through what happens in when that url is typed into the browser’s address bar. Or, start with a link to that url in your template and go from there.
  2. Explain one of your models, talking through any attributes or relationships on that model. Why did you build it this way? You could show us your database using DB Browser for SQLite, an ER Diagram that show relationships with other models, or creating or querying for model objects in the Django shell (or shell_plus).
  3. Show a template that you worked on and explain how the code in the template works. You should talk about the view context, any conditional rendering, content blocks, loops, or other interesting template tags and what they are doing in the template. It would be helpful to connect the code in the template to what is rendered in the browser.

Evaluation & starting the next phase

As with the end-of-phase of Phase 1, presentations are meant to assess what you’ve learned during the phase and to determine whether you are prepared to begin the next phase.

Your instructors will assess the work you’ve done and determine whether you will go on to the next phase.

The criteria for passing a phase are:

  • Your project is complete (it meets most, if not all, criteria in the original assignment).
  • You can explain how your code works. Instructors may ask you about any portion of it and you can give a reasonable explanation.

You might be asked to repeat the phase if:

  • You are unfamiliar with how your code works.

  • You have nothing to present.

If we have any concerns about you passing the phase, you will hear from me on Thursday afternoon, and I’ll ask you to meet with me on Friday morning. If you have any concerns about passing the phase you are welcome to reach out to me or Jessica before then.

🔖 Resources

Forms

Queries