Django Interview Question(Practical)
A.Basic Level :
Create a new Django project and a single app.
Define a model for a Book with fields: title, author, and
publication date.
Create views to list all books and show details of a
selected book.
Set up URL routing for both views above.
Use Django admin to add/edit/delete Book objects.
Create a simple HTML template to render book details.
Add static CSS to style the book listing page.
Display a welcome message on the homepage using a
Django view.
Use {% for %} and {% if %} template tags to iterate
over books and show a message if none exist.
Implement a contact form using Django's forms.Form.
Validate the contact form and print form data to the
console.
Connect the form to a view and show submitted data on
a thank-you page.
B. Medium Level:
Create a Blog model with title, content, author, and
created_at.
Implement a ModelForm for creating/editing blog posts.
Set up login/logout functionality using Django’s built-in
auth system.
Restrict blog post creation to logged-in users only.
Implement custom user registration.
Use Django messages framework to show success/failure
messages.
Add file/image upload functionality to the blog (e.g., a
featured image).
Create a search form to filter blog posts by keyword.
Add pagination to the blog listing view.
Create a comment system using ForeignKey relationships.
Implement a dashboard page that shows the current user’s
blog posts.
Customize the admin interface with search fields and list
filters.
C. Advance Level:
Build a REST API for a ToDo app using Django REST
Framework (DRF).
Implement JWT-based authentication for the API.
Add custom permissions so only the owner of a task can
edit/delete it.
Create a management command that sends a daily report
of new users.
Use select_related() and prefetch_related() to optimize
DB queries.
Set up a multi-app project (e.g., users, projects,payment)
with clear separation.
Create a signal that sends a welcome email after user
registration.
Implement role-based access control (admin, staff,
member) using Django groups.