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
8 from unfold.loginrequired import FreeAccessView
10 from manifoldapi.manifoldresult import ManifoldResult
11 from myslice.configengine import ConfigEngine
13 from myslice.theme import ThemeView
15 class NewsView (FreeAccessView, ThemeView):
16 template_name = 'news.html'
18 def get (self, request, state=None):
21 if request.user.is_authenticated():
22 env['person'] = self.request.user
23 env['username'] = self.request.user
26 env['username'] = None
28 env['theme'] = self.theme
29 env['section'] = "News"
31 return render_to_response(self.template, env, context_instance=RequestContext(request))