Exam in
10 questions
What are Migrations in Django?
For a model to be visible in the admin interface it has to be registered in which file?
If you have a Django application named members, and a model named Member, what is a correct syntax to import the model?
When you have done changes in a model in Django, which command has to be executed in order to make the changes take effect in the database?
We can register models in the admin.py file to view it in the administration site of Django.
"Post.Objects.all()" will retrieve all objects in the Post table.
"migrate" command in Django is used to show the changes happened in the database.
For a model to be visible in the admin interface it has to be registered in the settings.py file.
Django comes with a built-in user interface that allows you to administrate your data. To access this interface you have to create a user name and password. To create this such user, you write python mange.py createuser.