template + structure django CMS
[ifgu.git] / project / article / views.py
1 # Create your views here.
2 from article.models import Actualite
3 from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404
4 from django.template import Context, RequestContext
5 from django.shortcuts import redirect
6 from django.http import HttpResponse
7 from django.core.paginator import Paginator
8
9 def actualite(request):
10 item_list = Actualite.objects.filter(status=3).order_by('-date_pub')
11 return render_to_response('actualites.html', {'actualite_list': item_list, 'page_title': 'Actualite'}, context_instance = RequestContext(request))
12
13 def actualite_detail(request, slug):
14 p = get_object_or_404(Actualite, slug=slug)
15 return render_to_response('actualite_detail.html', {'actualite': p,'page_slug': 'actualites/', 'page_title': 'Actualite'}, context_instance = RequestContext(request))
16
17 def plan_du_site(request, slugRegion=''):
18 return render_to_response('sitemap.html', {'page_title': 'Plan du site'}, context_instance = RequestContext(request))