This repository has been archived on 2023-09-24. You can view files and clone it, but cannot push or open issues or pull requests.
takahe/users/views/admin/__init__.py

47 lines
1.3 KiB
Python
Raw Normal View History

2022-11-18 08:09:04 +01:00
from django import forms
from django.utils.decorators import method_decorator
2022-12-17 03:42:48 +01:00
from django.views.generic import FormView, RedirectView
2022-11-18 08:09:04 +01:00
from users.decorators import admin_required
from users.views.admin.domains import ( # noqa
DomainCreate,
DomainDelete,
DomainEdit,
Domains,
)
2022-11-26 01:52:43 +01:00
from users.views.admin.federation import FederationEdit, FederationRoot # noqa
2022-11-29 05:41:36 +01:00
from users.views.admin.hashtags import ( # noqa
HashtagCreate,
HashtagDelete,
HashtagEdit,
Hashtags,
)
2022-12-17 03:42:48 +01:00
from users.views.admin.identities import IdentitiesRoot, IdentityEdit # noqa
2022-12-17 22:45:31 +01:00
from users.views.admin.reports import ReportsRoot, ReportView # noqa
from users.views.admin.settings import ( # noqa
BasicSettings,
PoliciesSettings,
TuningSettings,
)
from users.views.admin.stator import Stator # noqa
2022-12-17 00:38:52 +01:00
from users.views.admin.users import UserEdit, UsersRoot # noqa
2022-11-18 08:09:04 +01:00
@method_decorator(admin_required, name="dispatch")
class AdminRoot(RedirectView):
pattern_name = "admin_basic"
@method_decorator(admin_required, name="dispatch")
class Invites(FormView):
template_name = "admin/invites.html"
extra_context = {"section": "invites"}
class form_class(forms.Form):
note = forms.CharField()
def get_context_data(self, *args, **kwargs):
context = super().get_context_data(*args, **kwargs)
return context