Django Views

CIS1902 Python Programming

Reminders

  • Feedback on final project proposals on Canvas submissions as a comment.
  • HW4 due April 29th.
    • Remember to use any late days you have left over!
    • Fully updated Django guide on the course website. This should be all you need for HW4! Will also be helpful for anyone building a webapp for the final project.
  • Our last lecture slot is next week, April 22nd.
    • I will briefly cover LLMs at scale and leave the second half of class for open OH.

Final Project Presentations 4/29

  • We have 17 (!) different projects to present, so keep things short, no longer than 5 minutes.
  • Try to limit your presentation to just 2 or 3 slides:
    • Project motivation/problem statement + description
    • Brief overview of solution or an interesting component you built
    • Demo if applicable
  • As a reminder, you cannot take any late days on the final project!
  • Final writeup + code is due Wednesday, April 30th.

Django Votr Lab

What we've done so far:

  • We created a Django application and setup the skeleton for views.
  • We then defined the models Question and Choice to represent our polls.
    • We registered these models to the Django admin site which let us easily create test data.
  • We built simple homepage and detail pages.
  • We added vote functionality by creating a new Vote model and adding a vote form to the detail page.

Django Votr Lab

What's left?

  • Generic views to simplify code
  • Polish to make things pretty
    • Great candidate for "vibe coding" 😎