umap/youmap/views.py
Yohan Boniface 0cce7f9e2a First POC
2012-11-20 10:47:19 +01:00

15 lines
302 B
Python

from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
def get_context_data(self, **kwargs):
maps = Map.objects.all()[:20]
return {
"maps": maps
}
home = Home.as_view()