Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

CodeSignal

Cooking App Structure & Database Modeling with Django

via CodeSignal

Overview

Set up the core Django project and a dedicated recipes app, then model the domain your API will rely on (recipes, ingredients, and ratings). You’ll configure settings (SQLite, CORS, static files), register models in the admin, and add a couple of CLI scripts to seed data and safely wipe/reset tables for local development.

Syllabus

  • Unit 1: Initializing Your Django Project
    • Fixing the Codesignal Environment
    • Enabling Cross Origin Request Support
    • Configuring Database for Your Cooking App
    • Creating the Main URL Router
    • Executing our app
  • Unit 2: Designing Database Models
    • Create Ingredient model
    • Add Recipe Model
    • Implement Recipe-Ingredient Many-to-Many Relationship in Django
    • Create Review Model with ForeignKey to Recipe
    • Register Ingredient, Recipe and Review Models in Django Admin
  • Unit 3: Resetting Your Database
    • Implement imports and Django setup in reset_database.py
    • Add User Confirmation to Database Reset Script
    • Enhance Database Reset Script with Transaction and Error Handling
    • Correct Deletion Order in Database Reset Script
    • Add Entry-Point Guard to Reset Database Script
  • Unit 4: Adding Manual Recipes
    • Fix Project Root Import Path in Add Manual Recipe Script
    • Add Recipe Name Prompt and Validation
    • Collect Recipe Ingredients
    • Implement prompt_for_steps Function
    • Implement Recipe Persistence with Django ORM
    • Implement Duplicate Recipe Prevention

Reviews

Start your review of Cooking App Structure & Database Modeling with Django

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.