# Path: djam/views/generic.py
# class FormView(FloppyformsMixin, RiffViewMixin, generic.FormView):
#     pass
# 
# class TemplateView(RiffViewMixin, generic.TemplateView):
#     pass


import urlparse
from django.contrib.auth import login, logout
from django.contrib.auth.forms import AuthenticationForm, PasswordChangeForm
from django.contrib.sites.models import Site
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext as _
from djam.views.generic import FormView, TemplateView
    redirect_field_name = REDIRECT_FIELD_NAME

    def get(self, request, *args, **kwargs):
        logout(request)
        self.redirect_to = request.GET.get(self.redirect_field_name)

        if self.redirect_to:
            netloc = urlparse.urlparse(self.redirect_to)[1]
            # Security check -- don't allow redirection to a different host.
            if not (netloc and netloc != request.get_host()):
                return HttpResponseRedirect(self.redirect_to)

        return super(LogoutView, self).get(request, *args, **kwargs)

    def get_context_data(self, **kwargs):
        context = super(LogoutView, self).get_context_data(**kwargs)
        context.update({
            'site': Site.objects.get_current(),
            'redirect_to': self.redirect_to,
            'redirect_field_name': self.redirect_field_name
        })
        return context

    def get_crumbs(self):
        return [
            (None, self.riff.base_riff.display_name),
            (None, _('Logout')),
        ]



# Path: djam/views/generic.py
# class FormView(FloppyformsMixin, RiffViewMixin, generic.FormView):
#     pass
# 
# class TemplateView(RiffViewMixin, generic.TemplateView):
#     pass


# Path: djam/views/auth.py
import urlparse
from django.contrib.auth import login, logout
from django.contrib.auth.forms import AuthenticationForm, PasswordChangeForm
from django.contrib.sites.models import Site
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext as _
from djam.views.generic import FormView, TemplateView

    redirect_field_name = REDIRECT_FIELD_NAME

    def get(self, request, *args, **kwargs):
        logout(request)
        self.redirect_to = request.GET.get(self.redirect_field_name)

        if self.redirect_to:
            netloc = urlparse.urlparse(self.redirect_to)[1]
            # Security check -- don't allow redirection to a different host.
            if not (netloc and netloc != request.get_host()):
                return HttpResponseRedirect(self.redirect_to)

        return super(LogoutView, self).get(request, *args, **kwargs)

    def get_context_data(self, **kwargs):
        context = super(LogoutView, self).get_context_data(**kwargs)
        context.update({
            'site': Site.objects.get_current(),
            'redirect_to': self.redirect_to,
            'redirect_field_name': self.redirect_field_name
        })
        return context

    def get_crumbs(self):
        return [
            (None, self.riff.base_riff.display_name),
            (None, _('Logout')),
        ]



class PasswordChangeView(FormView):