0PricingLogin
Django Academy · Lesson

Creating and Saving Objects Live

Insert rows interactively to test ideas fast.

Make a Row from Scratch

The shell lets you create database rows by hand. Start by building an instance with the values you want.

>>> p = Post(title="Hello", body="My first post")

Nothing Saved Yet

That instance lives only in memory so far. The database knows nothing about it until you explicitly write it.

All lessons in this course

  1. Launching python manage.py shell
  2. Importing and Inspecting Models
  3. Creating and Saving Objects Live
  4. shell_plus and Better Tooling
← Back to Django Academy