# Path: adminlte_full/adminlte.py
# class ConfigWrapper(object):
# class Manager(AbstractManager):
#     def get(self, name, default=''):
#     def create_url(self, endpoint, *endpoint_args, **endpoint_kwargs):
#     def get_flash_messages(self):
#     def static(self, filename):


from django.contrib import messages
from django.contrib.auth import views as auth_views
from django.shortcuts import render
from django.views.decorators.csrf import requires_csrf_token
from django.urls.base import reverse_lazy
from django.utils.translation import gettext_lazy as _
from .adminlte import config
from .forms import *
    return error_page(
        request, 404, 'Page not found',
        'The requested URL was not found on the server.'
        'If you entered the URL manually please check your spelling and try again.'
    )


@requires_csrf_token
def handler500(request):
    return error_page(
        request, 500, 'Internal Server Error',
        'The server encountered an internal error and was unable to complete your request.'
        'Either the server is overloaded or there is an error in the application.'
    )


class LoginView(auth_views.LoginView):
    form_class = AuthenticationForm
    template_name = 'adminlte_full/login.html'


class PasswordChangeView(auth_views.PasswordChangeView):
    form_class = PasswordChangeForm
    template_name = 'adminlte_full/change_password.html'
    success_url = reverse_lazy(config['ADMINLTE_LOGIN_ENDPOINT'])


class PasswordResetView(auth_views.PasswordResetView):
    form_class = PasswordResetForm
    template_name = 'adminlte_full/forgot_password.html'

# Path: adminlte_full/adminlte.py
# class ConfigWrapper(object):
# class Manager(AbstractManager):
#     def get(self, name, default=''):
#     def create_url(self, endpoint, *endpoint_args, **endpoint_kwargs):
#     def get_flash_messages(self):
#     def static(self, filename):


# Path: adminlte_full/views.py
from django.contrib import messages
from django.contrib.auth import views as auth_views
from django.shortcuts import render
from django.views.decorators.csrf import requires_csrf_token
from django.urls.base import reverse_lazy
from django.utils.translation import gettext_lazy as _
from .adminlte import config
from .forms import *

    return error_page(
        request, 404, 'Page not found',
        'The requested URL was not found on the server.'
        'If you entered the URL manually please check your spelling and try again.'
    )


@requires_csrf_token
def handler500(request):
    return error_page(
        request, 500, 'Internal Server Error',
        'The server encountered an internal error and was unable to complete your request.'
        'Either the server is overloaded or there is an error in the application.'
    )


class LoginView(auth_views.LoginView):
    form_class = AuthenticationForm
    template_name = 'adminlte_full/login.html'


class PasswordChangeView(auth_views.PasswordChangeView):
    form_class = PasswordChangeForm
    template_name = 'adminlte_full/change_password.html'
    success_url = reverse_lazy(config['ADMINLTE_LOGIN_ENDPOINT'])


class PasswordResetView(auth_views.PasswordResetView):
    form_class = PasswordResetForm
    template_name = 'adminlte_full/forgot_password.html'

    success_url = reverse_lazy(config['ADMINLTE_LOGIN_ENDPOINT'])