Jan Dittberner
8a29e4001c
- add new dashboard app providing dashboards for anonymous and logged in users - cleanup gnuviechadmin.urls: - import dashboard.urls and include dashboard_urls at URL root - import authentication urls and include them below /auth - remove generated commented code
31 lines
632 B
Python
31 lines
632 B
Python
"""
|
|
This module defines the views for the gnuviechadmin customer dashboard.
|
|
|
|
"""
|
|
from __future__ import unicode_literals
|
|
|
|
from django.views.generic import (
|
|
DetailView,
|
|
TemplateView,
|
|
)
|
|
from django.contrib.auth import get_user_model
|
|
|
|
from braces.views import LoginRequiredMixin
|
|
|
|
|
|
class IndexView(TemplateView):
|
|
"""
|
|
This is the dashboard view.
|
|
|
|
"""
|
|
template_name = 'dashboard/index.html'
|
|
|
|
|
|
class UserDashboardView(DetailView, LoginRequiredMixin):
|
|
"""
|
|
This is the user dashboard view.
|
|
|
|
"""
|
|
model = get_user_model()
|
|
slug_field = 'username'
|
|
template_name = 'dashboard/user_dashboard.html'
|