May 2020
Intermediate to advanced
404 pages
10h 52m
English
To start using the Bills model in the app, we first need to import it to the views.py file.
Add the following line at the top of the view.py file:
from .models import Bills
Then, we can add the view for the billboard, as shown:
def board(request): template = loader.get_template('board.html') context = {} context["isLogged"] = 1 Bill = Bills.objects.all() context["bills"] = Bill return HttpResponse(template.render(context, request))
Next, we need to create the view for adding the bills.
Read now
Unlock full access