reviewboard.admin.admin_sites¶
Django AdminSite customization for Review Board.
-
class
AuthenticationForm
(request=None, *args, **kwargs)[source]¶ Bases:
reviewboard.accounts.forms.auth.ReviewBoardAuthenticationFormMixin
,django.contrib.admin.forms.AdminAuthenticationForm
Authentication form for the administration UI.
This builds upon the main admin authentication form (which handles permission checks when verifying a username) by incorporating the capabilities of the main Review Board administration form, allowing e-mail addresses as usernames and rate limiting login attempts.
New in version 4.0.
-
class
AdminSite
(*args, **kwargs)[source]¶ Bases:
django.contrib.admin.sites.AdminSite
Main administration site for Review Board.
This provides customization of the administration UI, while maintaining Model/Admin registration compatibility with the standard Django administration UI.
Technically, this is focused on the Database section of the administration UI, though it’s planned to be used to consolidate more of the UI in the future.
All code should reference
admin_site
where possible, rather thandjango.contrib.admin.site
.New in version 4.0.
-
login_form
[source]¶ alias of
AuthenticationForm
-
get_model_admin
(model_cls)[source]¶ Return the ModelAdmin for a given Model class.
Parameters: model_cls (type) – The registered model class. Returns: The ModelAdmin for the Model, or None
if one is not registered.Return type: django.contrib.admin.ModelAdmin
-