Skip to content

Workshop Part 2

ABG edited this page Nov 17, 2022 · 6 revisions

Workshop Part 2 Prerequisites:

Attendees should have completed Workshop Part 1 or successfully completed all items on our environment setup list.

  • Basic knowledge of Git (link)
  • Docker (link)
  • Django Rest Framework (link)
  • Additional resources (read if you want to, but not required)

Overview

This portion of the workshop will work through the steps for creating a PostgreSQL database table using Django, creating an API endpoint with the Django REST Framework (DRF), and writing tests using Pytest.

Agenda

  • Select an issue (5 minutes)
  • Create a model (5 minutes)
  • Write a test for the model and make sure it passes (10 minutes)
  • Register the model (5 minutes)
  • Make sure the admin site is working (5 minutes)
  • Create a serializer for the model (5 minutes)
  • Create a view set for the API endpoints (15 minutes)
  • Register the endpoint (5 minutes)
  • Create a test for the endpoint(s) (10 minutes)
  • Troubleshooting (10 minutes)
Clone this wiki locally