Skip to content

Instantly share code, notes, and snippets.

@drteresavasquez
Last active May 25, 2023 02:20
Show Gist options
  • Save drteresavasquez/c3df2250e9efcf2584a1e979543d58be to your computer and use it in GitHub Desktop.
Save drteresavasquez/c3df2250e9efcf2584a1e979543d58be to your computer and use it in GitHub Desktop.
  1. Create your models
    • This is how you define the data stored in the database and how that data is saved
  2. Create your forms (using ModelForm: https://docs.djangoproject.com/en/4.2/topics/forms/modelforms)
  3. Created view
    • This makes the data (aka: context) available to the html template
  4. Create the template that interpolates the data from the view
    • This renders the form
  5. Create a URL that serves the view to users
    • EXAMPLE:
    from api.views import register
    path("register/", register, name="register")
  6. On submit of the form, the view will deal with the data after the form gets submitted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment