adicionando view de notícias e adicionando listagem de menu
[cascardo/eventmanager.git] / conteudo / views.py
index 60f00ef..d7767a1 100644 (file)
@@ -1 +1,9 @@
-# Create your views here.
+from django.shortcuts import render_to_response
+from django.template import RequestContext, Context
+from eventmanager.conteudo.models import Noticia
+
+def noticia(request, nid):
+    n = Noticia.objects.get(pk=int(nid))
+    c = Context({'noticia': n})
+    return render_to_response('noticia.html', c,
+            context_instance=RequestContext(request))