Explain with the following files and directories in a basic Django project do:
mysite/
manage.py
mysite/
__init__.py
settings.py
urls.py
wsgi.py
Django engineers are often required to have a knowledge of the full web stack: starting with the ability to write optimized SQL queries, and wrapping up with a good understanding of HTML/CSS. When interviewing a Django developer, make sure that you think through your requirements and ask good questions for all of them in your interview.
Here's a suggestion for a good menu of Django interview questions:
Explain with the following files and directories in a basic Django project do:
mysite/
manage.py
mysite/
__init__.py
settings.py
urls.py
wsgi.py
Complete the following Django model to illustrate how a manufacturer can make many different types of cars.
Give manufacturer a name, founding date and a country.
Give car a name, cost, engine capacity and color. Assume that the manufacturer makes cars in only {red, green, blue and pink}.
class Manufacturer(models.Model):
# A car manufacturer
class Car(models.Model):
# A type of car
What is a generic view in Django? What generic views ship with Django? What do they do?
Explain what the following Django model code does? What's the relationship between topping and pizza?
class Topping(models.Model):
# ...
class Pizza(models.Model):
# ...
toppings = models.ManyToManyField(Topping)
What is a signal in Django? Where might you use one? What's the difference between send() and send_robust()? When might you use one over the other?
What does the following code do? What's another way of doing the same thing?
from django.core.signals import request_finished
from django.dispatch import receiver
@receiver(request_finished)
def my_callback(sender, **kwargs):
print "Request finished!"
Complete the following Django form to include:
subject with a maximum length of 100 characterscc_myself fieldsender field that will be validated as a correctly formatted email addressfrom django import forms
class ContactForm(forms.Form):
message = forms.CharField()