starting omn plugin
[unfold.git] / portal / newsview.py
1 from django.core.context_processors import csrf
2 from django.http import HttpResponseRedirect
3 from django.contrib.auth import authenticate, login, logout
4 from django.template import RequestContext
5 from django.shortcuts import render_to_response
6 from django.shortcuts import render
7
8 from unfold.loginrequired import FreeAccessView
9
10 from manifoldapi.manifoldresult import ManifoldResult
11 from myslice.configengine import ConfigEngine
12
13 from myslice.theme import ThemeView
14
15 class NewsView (FreeAccessView, ThemeView):
16     template_name = 'news.html'
17
18     def get (self, request, state=None):
19         env = {}
20         
21         if request.user.is_authenticated(): 
22             env['person'] = self.request.user
23             env['username'] = self.request.user
24         else: 
25             env['person'] = None
26             env['username'] = None
27     
28         env['theme'] = self.theme
29         env['section'] = "News"
30
31         return render_to_response(self.template, env, context_instance=RequestContext(request))
32