legacy-dotfiles/links/views.py

13 lines
357 B
Python
Raw Normal View History

2011-10-17 01:34:04 +02:00
from links.models import Bookmark
from django.http import HttpResponse
from django.template import Context, loader
def index(request):
bookmark_list = Bookmark.objects.all().order_by("-date")[:100]
t = loader.get_template("links/links.html")
c = Context({
'bookmarklist': bookmark_list,
})
return HttpResponse(t.render(c))