Font size
S
M
L
XL
WorksheetsDjango
Total questions: 100
Worksheet time: 50mins
Name
Class
Date
1.
What is Django?
a)
A programming language
b)
A web framework
c)
A database management system
d)
A code editor
2.
Which programming language does Django use?
a)
Java
b)
Python
c)
PHP
d)
C++
3.
What is the purpose of `views.py` in Django?
a)
Handling database operations
b)
Defining functions to handle HTTP requests
c)
Defining templates
d)
Declaring static files
4.
Which file does Django use for URL routing?
a)
models.py
b)
urls.py
c)
views.py
d)
settings.py
5.
Which command is used to create a new Django app?
a)
django-admin startproject mysite
b)
django-admin startapp blog
c)
django-admin createapp blog
d)
python manage.py newapp blog
6.
Which syntax is used to display dynamic content in a Django template?
a)
{{ variable }}
b)
{% variable %}
c)
{% print(variable) %}
d)
{# variable #}
7.
When should you use `makemigrations` in Django?
a)
When modifying a template
b)
When modifying database models
c)
When setting up URL routing
d)
When modifying settings.py
8.
Which command is used to start the Django server?
a)
python manage.py runserver
b)
django-admin runserver
c)
python server.py
d)
django startserver
9.
Which syntax is used to inherit a template from another file in Django?
a)
{% include 'base.html' %}
b)
{% extends 'base.html' %}
c)
{% import 'base.html' %}
d)
{% require 'base.html' %}
10.
You have a `Post` model. Which query retrieves all posts containing the word 'Django' in the title?
a)
Post.objects.get(title='Django')
b)
Post.objects.filter(title__contains='Django')
c)
Post.objects.select(title='Django')
d)
Post.objects.find(title='Django')
11.
What is Django?
a)
A programming language
b)
A web framework
c)
A database management system
d)
A code editor
12.
Which programming language does Django use?
a)
Java
b)
Python
c)
PHP
d)
C++
13.
What is the purpose of `views.py` in Django?
a)
Handling database operations
b)
Defining functions to handle HTTP requests
c)
Defining templates
d)
Declaring static files
14.
Which file does Django use for URL routing?
a)
models.py
b)
urls.py
c)
views.py
d)
settings.py
15.
Which command is used to create a new Django app?
a)
django-admin startproject mysite
b)
django-admin startapp blog
c)
django-admin createapp blog
d)
python manage.py newapp blog
16.
Which syntax is used to display dynamic content in a Django template?
a)
{{ variable }}
b)
{% variable %}
c)
{% print(variable) %}
d)
{# variable #}
17.
When should you use `makemigrations` in Django?
a)
When modifying a template
b)
When modifying database models
c)
When setting up URL routing
d)
When modifying settings.py
18.
Which command is used to start the Django server?
a)
python manage.py runserver
b)
django-admin runserver
c)
python server.py
d)
django startserver
19.
Which syntax is used to inherit a template from another file in Django?
a)
{% include 'base.html' %}
b)
{% extends 'base.html' %}
c)
{% import 'base.html' %}
d)
{% require 'base.html' %}
20.
You have a `Post` model. Which query retrieves all posts containing the word 'Django' in the title?
a)
Post.objects.get(title='Django')
b)
Post.objects.filter(title__contains='Django')
c)
Post.objects.select(title='Django')
d)
Post.objects.find(title='Django')
21.
What is Django?
a)
A programming language
b)
A web framework
c)
A database management system
d)
A code editor
22.
Which programming language does Django use?
a)
Java
b)
Python
c)
PHP
d)
C++
23.
What is the purpose of `views.py` in Django?
a)
Handling database operations
b)
Defining functions to handle HTTP requests
c)
Defining templates
d)
Declaring static files
24.
Which file does Django use for URL routing?
a)
models.py
b)
urls.py
c)
views.py
d)
settings.py
25.
Which command is used to create a new Django app?
a)
django-admin startproject mysite
b)
django-admin startapp blog
c)
django-admin createapp blog
d)
python manage.py newapp blog
26.
Which syntax is used to display dynamic content in a Django template?
a)
{{ variable }}
b)
{% variable %}
c)
{% print(variable) %}
d)
{# variable #}
27.
When should you use `makemigrations` in Django?
a)
When modifying a template
b)
When modifying database models
c)
When setting up URL routing
d)
When modifying settings.py
28.
Which command is used to start the Django server?
a)
python manage.py runserver
b)
django-admin runserver
c)
python server.py
d)
django startserver
29.
Which syntax is used to inherit a template from another file in Django?
a)
{% include 'base.html' %}
b)
{% extends 'base.html' %}
c)
{% import 'base.html' %}
d)
{% require 'base.html' %}
30.
You have a `Post` model. Which query retrieves all posts containing the word 'Django' in the title?
a)
Post.objects.get(title='Django')
b)
Post.objects.filter(title__contains='Django')
c)
Post.objects.select(title='Django')
d)
Post.objects.find(title='Django')
31.
What is Django?
a)
A programming language
b)
A web framework
c)
A database management system
d)
A code editor
32.
Which programming language does Django use?
a)
Java
b)
Python
c)
PHP
d)
C++
33.
What is the purpose of `views.py` in Django?
a)
Handling database operations
b)
Defining functions to handle HTTP requests
c)
Defining templates
d)
Declaring static files
34.
Which file does Django use for URL routing?
a)
models.py
b)
urls.py
c)
views.py
d)
settings.py
35.
Which command is used to create a new Django app?
a)
django-admin startproject mysite
b)
django-admin startapp blog
c)
django-admin createapp blog
d)
python manage.py newapp blog
36.
Which syntax is used to display dynamic content in a Django template?
a)
{{ variable }}
b)
{% variable %}
c)
{% print(variable) %}
d)
{# variable #}
37.
When should you use `makemigrations` in Django?
a)
When modifying a template
b)
When modifying database models
c)
When setting up URL routing
d)
When modifying settings.py
38.
Which command is used to start the Django server?
a)
python manage.py runserver
b)
django-admin runserver
c)
python server.py
d)
django startserver
39.
Which syntax is used to inherit a template from another file in Django?
a)
{% include 'base.html' %}
b)
{% extends 'base.html' %}
c)
{% import 'base.html' %}
d)
{% require 'base.html' %}
40.
You have a `Post` model. Which query retrieves all posts containing the word 'Django' in the title?
a)
Post.objects.get(title='Django')
b)
Post.objects.filter(title__contains='Django')
c)
Post.objects.select(title='Django')
d)
Post.objects.find(title='Django')
41.
What is Django?
a)
A programming language
b)
A web framework
c)
A database management system
d)
A code editor
42.
Which programming language does Django use?
a)
Java
b)
Python
c)
PHP
d)
C++
43.
What is the purpose of `views.py` in Django?
a)
Handling database operations
b)
Defining functions to handle HTTP requests
c)
Defining templates
d)
Declaring static files
44.
Which file does Django use for URL routing?
a)
models.py
b)
urls.py
c)
views.py
d)
settings.py
45.
Which command is used to create a new Django app?
a)
django-admin startproject mysite
b)
django-admin startapp blog
c)
django-admin createapp blog
d)
python manage.py newapp blog
46.
Which syntax is used to display dynamic content in a Django template?
a)
{{ variable }}
b)
{% variable %}
c)
{% print(variable) %}
d)
{# variable #}
47.
When should you use `makemigrations` in Django?
a)
When modifying a template
b)
When modifying database models
c)
When setting up URL routing
d)
When modifying settings.py
48.
Which command is used to start the Django server?
a)
python manage.py runserver
b)
django-admin runserver
c)
python server.py
d)
django startserver
49.
Which syntax is used to inherit a template from another file in Django?
a)
{% include 'base.html' %}
b)
{% extends 'base.html' %}
c)
{% import 'base.html' %}
d)
{% require 'base.html' %}
50.
You have a `Post` model. Which query retrieves all posts containing the word 'Django' in the title?
a)
Post.objects.get(title='Django')
b)
Post.objects.filter(title__contains='Django')
c)
Post.objects.select(title='Django')
d)
Post.objects.find(title='Django')
51.
What is Django?
a)
A programming language
b)
A web framework
c)
A database management system
d)
A code editor
52.
Which programming language does Django use?
a)
Java
b)
Python
c)
PHP
d)
C++
53.
What is the purpose of `views.py` in Django?
a)
Handling database operations
b)
Defining functions to handle HTTP requests
c)
Defining templates
d)
Declaring static files
54.
Which file does Django use for URL routing?
a)
models.py
b)
urls.py
c)
views.py
d)
settings.py
55.
Which command is used to create a new Django app?
a)
django-admin startproject mysite
b)
django-admin startapp blog
c)
django-admin createapp blog
d)
python manage.py newapp blog
56.
Which syntax is used to display dynamic content in a Django template?
a)
{{ variable }}
b)
{% variable %}
c)
{% print(variable) %}
d)
{# variable #}
57.
When should you use `makemigrations` in Django?
a)
When modifying a template
b)
When modifying database models
c)
When setting up URL routing
d)
When modifying settings.py
58.
Which command is used to start the Django server?
a)
python manage.py runserver
b)
django-admin runserver
c)
python server.py
d)
django startserver
59.
Which syntax is used to inherit a template from another file in Django?
a)
{% include 'base.html' %}
b)
{% extends 'base.html' %}
c)
{% import 'base.html' %}
d)
{% require 'base.html' %}
60.
You have a `Post` model. Which query retrieves all posts containing the word 'Django' in the title?
a)
Post.objects.get(title='Django')
b)
Post.objects.filter(title__contains='Django')
c)
Post.objects.select(title='Django')
d)
Post.objects.find(title='Django')
61.
What is Django?
a)
A programming language
b)
A web framework
c)
A database management system
d)
A code editor
62.
Which programming language does Django use?
a)
Java
b)
Python
c)
PHP
d)
C++
63.
What is the purpose of `views.py` in Django?
a)
Handling database operations
b)
Defining functions to handle HTTP requests
c)
Defining templates
d)
Declaring static files
64.
Which file does Django use for URL routing?
a)
models.py
b)
urls.py
c)
views.py
d)
settings.py
65.
Which command is used to create a new Django app?
a)
django-admin startproject mysite
b)
django-admin startapp blog
c)
django-admin createapp blog
d)
python manage.py newapp blog
66.
Which syntax is used to display dynamic content in a Django template?
a)
{{ variable }}
b)
{% variable %}
c)
{% print(variable) %}
d)
{# variable #}
67.
When should you use `makemigrations` in Django?
a)
When modifying a template
b)
When modifying database models
c)
When setting up URL routing
d)
When modifying settings.py
68.
Which command is used to start the Django server?
a)
python manage.py runserver
b)
django-admin runserver
c)
python server.py
d)
django startserver
69.
Which syntax is used to inherit a template from another file in Django?
a)
{% include 'base.html' %}
b)
{% extends 'base.html' %}
c)
{% import 'base.html' %}
d)
{% require 'base.html' %}
70.
You have a `Post` model. Which query retrieves all posts containing the word 'Django' in the title?
a)
Post.objects.get(title='Django')
b)
Post.objects.filter(title__contains='Django')
c)
Post.objects.select(title='Django')
d)
Post.objects.find(title='Django')
71.
What is Django?
a)
A programming language
b)
A web framework
c)
A database management system
d)
A code editor
72.
Which programming language does Django use?
a)
Java
b)
Python
c)
PHP
d)
C++
73.
What is the purpose of `views.py` in Django?
a)
Handling database operations
b)
Defining functions to handle HTTP requests
c)
Defining templates
d)
Declaring static files
74.
Which file does Django use for URL routing?
a)
models.py
b)
urls.py
c)
views.py
d)
settings.py
75.
Which command is used to create a new Django app?
a)
django-admin startproject mysite
b)
django-admin startapp blog
c)
django-admin createapp blog
d)
python manage.py newapp blog
76.
Which syntax is used to display dynamic content in a Django template?
a)
{{ variable }}
b)
{% variable %}
c)
{% print(variable) %}
d)
{# variable #}
77.
When should you use `makemigrations` in Django?
a)
When modifying a template
b)
When modifying database models
c)
When setting up URL routing
d)
When modifying settings.py
78.
Which command is used to start the Django server?
a)
python manage.py runserver
b)
django-admin runserver
c)
python server.py
d)
django startserver
79.
Which syntax is used to inherit a template from another file in Django?
a)
{% include 'base.html' %}
b)
{% extends 'base.html' %}
c)
{% import 'base.html' %}
d)
{% require 'base.html' %}
80.
You have a `Post` model. Which query retrieves all posts containing the word 'Django' in the title?
a)
Post.objects.get(title='Django')
b)
Post.objects.filter(title__contains='Django')
c)
Post.objects.select(title='Django')
d)
Post.objects.find(title='Django')
81.
What is Django?
a)
A programming language
b)
A web framework
c)
A database management system
d)
A code editor
82.
Which programming language does Django use?
a)
Java
b)
Python
c)
PHP
d)
C++
83.
What is the purpose of `views.py` in Django?
a)
Handling database operations
b)
Defining functions to handle HTTP requests
c)
Defining templates
d)
Declaring static files
84.
Which file does Django use for URL routing?
a)
models.py
b)
urls.py
c)
views.py
d)
settings.py
85.
Which command is used to create a new Django app?
a)
django-admin startproject mysite
b)
django-admin startapp blog
c)
django-admin createapp blog
d)
python manage.py newapp blog
86.
Which syntax is used to display dynamic content in a Django template?
a)
{{ variable }}
b)
{% variable %}
c)
{% print(variable) %}
d)
{# variable #}
87.
When should you use `makemigrations` in Django?
a)
When modifying a template
b)
When modifying database models
c)
When setting up URL routing
d)
When modifying settings.py
88.
Which command is used to start the Django server?
a)
python manage.py runserver
b)
django-admin runserver
c)
python server.py
d)
django startserver
89.
Which syntax is used to inherit a template from another file in Django?
a)
{% include 'base.html' %}
b)
{% extends 'base.html' %}
c)
{% import 'base.html' %}
d)
{% require 'base.html' %}
90.
You have a `Post` model. Which query retrieves all posts containing the word 'Django' in the title?
a)
Post.objects.get(title='Django')
b)
Post.objects.filter(title__contains='Django')
c)
Post.objects.select(title='Django')
d)
Post.objects.find(title='Django')
91.
What is Django?
a)
A programming language
b)
A web framework
c)
A database management system
d)
A code editor
92.
Which programming language does Django use?
a)
Java
b)
Python
c)
PHP
d)
C++
93.
What is the purpose of `views.py` in Django?
a)
Handling database operations
b)
Defining functions to handle HTTP requests
c)
Defining templates
d)
Declaring static files
94.
Which file does Django use for URL routing?
a)
models.py
b)
urls.py
c)
views.py
d)
settings.py
95.
Which command is used to create a new Django app?
a)
django-admin startproject mysite
b)
django-admin startapp blog
c)
django-admin createapp blog
d)
python manage.py newapp blog
96.
Which syntax is used to display dynamic content in a Django template?
a)
{{ variable }}
b)
{% variable %}
c)
{% print(variable) %}
d)
{# variable #}
97.
When should you use `makemigrations` in Django?
a)
When modifying a template
b)
When modifying database models
c)
When setting up URL routing
d)
When modifying settings.py
98.
Which command is used to start the Django server?
a)
python manage.py runserver
b)
django-admin runserver
c)
python server.py
d)
django startserver
99.
Which syntax is used to inherit a template from another file in Django?
a)
{% include 'base.html' %}
b)
{% extends 'base.html' %}
c)
{% import 'base.html' %}
d)
{% require 'base.html' %}
100.
You have a `Post` model. Which query retrieves all posts containing the word 'Django' in the title?
a)
Post.objects.get(title='Django')
b)
Post.objects.filter(title__contains='Django')
c)
Post.objects.select(title='Django')
d)
Post.objects.find(title='Django')
Reset
