Django Level Two Flashcards
what do we use o tie a database to a Django Project?
Models
What backend engine comes with django? is the only one you can use?
SQLite
no
Each attribute of a Model class represents a …
field
SQL operates like a …
giant table
What is a field constraint?
an argument passed into a field method that limits something.
Tables can reference each other using the concepts of ___ and ___.
Foreign Keys and Primary Keys.
__: a unique identifier for each row in a table
Primary Key
___: denotes that the column coincides with a primary key of another table.
Foreign Key
The migrate command:
python manage.py migrate
command to register migrations changes to the app?
python manage.py makemigrations app1
What must we do to interact with models using the admin interface?
We must register them to the app’s admin.py file
A ___ needs to be created to be able to use the Admin features.
superuser
Command for creating a superuser.
python manage.py createsuperuser
The name of the model(class) is synonymous to the name of …
the data-table to be created.
every model (class) inherits from …
the Django base class models.Model