Skip to content

Django Development Tutorial

ochan1 edited this page Feb 14, 2023 · 2 revisions

These tutorials don't replace one or the other. Each covers some base materials with each other, but some cover additional materials different from the other. Skim each one and see what you learn from them!

Django Polls Tutorial

Django has a comprehensive polls app tutorial that contains most of what you need to know to get started on Django and our code base

Click here to get started

Addendums, Notes, deviations

  • There are slightly differences with the tutorial setup and the setup of the repos:
    • settings.py is under “tbpweb/settings/” and all the files in there
      • Two separate settings.py files for Development and Production each
      • Many of the things you should edit are in base.py, which is a Shared Python between Dev and Deploy

Harvard CS 50 Extension Course on Django

If you're more of a visual person, there is also Harvard's lecture on Django that is very interesting to look at!

Click here to watch the full lecture

Addendums, Notes, deviations

  • Timestamp to 35:57 (Introduction to Django Shell, right before Rendering Templates)
    • What to look for:
      • Don’t worry about using “manage.py startapp” to initialize the website directory, since it already exists, but keep in mind that that is how a Django app is initialized:
        • python manage.py startapp [appName]
      • Note the purpose of each file in each particular “app” of the website
        • views.py
        • urls.py
        • models.py
        • apps.py
      • Note how “makemigrations” is used and why it exists
      • There are slightly differences with the video setup and the setup of the repos:
        • settings.py is under “tbpweb/settings/” and all the files in there
          • Two separate settings.py files for Development and Deployment each
          • Many of the things you should edit are in base.py, which is a Shared Python between Dev and Deploy
  • Timestamp 1:09:52 to 1:22:36 (Registration to CSRF, right before Login and Authentication)
    • Note that ""Registration" in the CS 50 video means Registering someone to a flight (nothing to do with Django’s login)
      • Note how they are able to send data to the Front End by using a dictionary to (sort of in a way) assign variables that will be used in the Django HTML
      • Note how they handle potential edge cases
  • We don't ask you do the Pizza project (as we have the Polls Tutorial project)

Supplemental Topics

Supplemental Django Topics

Archived Development Tutorials