13 lines
357 B
Python
13 lines
357 B
Python
|
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))
|