Skip to content

Glossary: Django Basics

__init__

Also written: init method

The special method Python runs when you create a new object from a class, such as `Bag("House Espresso", "16.00")`. It sets up the object's starting attributes.

Where the book teaches it

Related terms

classmethodselfattribute