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
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 load balancing? Describe three different types of load balancing techniques? What problems can load balancing solve? What problems can it introduce?
A user types the following URL into their browser: http://www.foo.com/bar.php
Explain in detail how this would cause a page to appear in their browser, with images, interactive elements (Ajax), styled paragraphs of text etc.
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()
Describe a schema (or classes) to power an online car rental system. Describe the tables and the relationships beween the tables.
Describe the MVC design pattern and how you might use it in practice.
Implement it.