2019-10-25 11:33:37 +00:00
|
|
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
2019-10-10 07:18:34 +00:00
|
|
|
from django.shortcuts import render
|
2019-10-29 09:58:54 +00:00
|
|
|
from django.urls import reverse_lazy
|
2019-10-25 11:33:37 +00:00
|
|
|
from django.views.generic.base import TemplateView
|
2019-10-29 09:58:54 +00:00
|
|
|
from django.views.generic.edit import FormView
|
2019-10-10 07:18:34 +00:00
|
|
|
|
2019-10-29 09:58:54 +00:00
|
|
|
from . import api, get_version
|
|
|
|
from .forms import LoginForm
|
2019-10-25 11:33:37 +00:00
|
|
|
from .mixins import CustomContextMixin
|
|
|
|
|
|
|
|
|
|
|
|
class DashboardView(CustomContextMixin, TemplateView): ## TODO LoginRequiredMixin
|
|
|
|
template_name = "musician/dashboard.html"
|
2019-10-29 09:58:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
class LoginView(FormView):
|
|
|
|
template_name = 'auth/login.html'
|
|
|
|
form_class = LoginForm
|
|
|
|
success_url = reverse_lazy('musician:dashboard')
|
|
|
|
extra_context = {'version': get_version()}
|