##// END OF EJS Templates
Removed old maintenance module, that was used prior to data migrations. Cleaned up requirements. Minor fix in the tag model
Removed old maintenance module, that was used prior to data migrations. Cleaned up requirements. Minor fix in the tag model

File last commit:

r730:447bb8d7 2.0-dev
r731:f96ca2ca 2.0-dev
Show More
logout.py
23 lines | 649 B | text/x-python | PythonLexer
neko259
Added login and logout for moderators
r729 from django.shortcuts import render
neko259
Divided settings manager into base settings manager class and session-based settings manager. This allowes to add other backends to the settings manager
r730 from boards.abstracts.settingsmanager import PERMISSION_MODERATE,\
get_settings_manager
neko259
Added login and logout for moderators
r729 from boards.forms import LoginForm
from boards.views.base import BaseBoardView, CONTEXT_FORM
__author__ = 'neko259'
class LogoutView(BaseBoardView):
def get(self, request, form=None):
neko259
Divided settings manager into base settings manager class and session-based settings manager. This allowes to add other backends to the settings manager
r730 settings_manager = get_settings_manager(request)
neko259
Added login and logout for moderators
r729 settings_manager.del_permission(PERMISSION_MODERATE)
context = self.get_context_data(request=request)
if not form:
form = LoginForm()
context[CONTEXT_FORM] = form
return render(request, 'boards/login.html', context)