Jump to >

reviewboard.admin.admin_sites

Django AdminSite customization for Review Board.

class AuthenticationForm(request=None, *args, **kwargs)[source]

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]

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 than django.contrib.admin.site.

New in version 4.0.

login_form[source]

alias of reviewboard.admin.admin_sites.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

admin_site = <reviewboard.admin.admin_sites.AdminSite object>[source]

The main instance for the Review Board administration site.

New in version 4.0.