Skip to content

Instantly share code, notes, and snippets.

@RedGhoul
Created December 9, 2017 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RedGhoul/3c76b563d6ed8051d0283d6b4fd670d7 to your computer and use it in GitHub Desktop.
Save RedGhoul/3c76b563d6ed8051d0283d6b4fd670d7 to your computer and use it in GitHub Desktop.
from django.shortcuts import render
from django.http import HttpResponse
from first_app.models import Topic,Webpage,AccessRecord
# Create your views here.
def index(request):
webpages_list = AccessRecord.objects.order_by('date')
date_dict = {'access_records': webpages_list}
my_dict = {'insert_me':"This is coming from da Index.html!!!"}
return render(request,'first_app/index.html',context=date_dict)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment