Admin-Views

Contains basic views used in the NDRCore admin interface.

class ndr_core.admin_views.admin_views.AdminViewMixin
class ndr_core.admin_views.admin_views.HelpView

The HelpView shows the help page.

get(request, *args, **kwargs)

GET request for this view.

class ndr_core.admin_views.admin_views.NdrCoreDashboard

The NDR Core dashboard is the start page of the admin interface. It shows your pages and your options.

get(request, *args, **kwargs)

GET request for this view.

class ndr_core.admin_views.admin_views.StatisticsFilter(data=None, queryset=None, *, request=None, prefix=None)

Filter for the search statistics.

class Meta
fields = {'search_query': ['contains']}
model

alias of NdrCoreSearchStatisticEntry

base_filters = {'search_query__contains': <django_filters.filters.CharFilter object>}
declared_filters = {}
class ndr_core.admin_views.admin_views.StatisticsView

View to show the search statistics.

filterset_class

alias of StatisticsFilter

get_context_data(**kwargs)

Overridden version of .TemplateResponseMixin to inject the table into the template’s context.

get_queryset()

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

model

alias of NdrCoreSearchStatisticEntry

paginate_by = 25
table_class

alias of StatisticsTable

template_name = 'ndr_core/admin_views/overview/view_statistics.html'
ndr_core.admin_views.admin_views.set_statistics_option(request, option)

Sets the statistics option to the given value.

Admin-Forms

Contains general forms used in the NDRCore admin interface.

class ndr_core.admin_forms.admin_forms.ConnectWithNdrCoreForm(*args, **kwargs)

A Form to activate or deactivate the connection with the NDRCore.org website.

base_fields = {}
declared_fields = {}
property media

Return all media required to render the widgets on this form.

class ndr_core.admin_forms.admin_forms.NdrCoreChangePasswordForm(*args, **kwargs)

Takes Django’s change password form and adds an input to it, so it can be rendered with crispy forms

base_fields = {'new_password1': <django.forms.fields.CharField object>, 'new_password2': <django.forms.fields.CharField object>, 'old_password': <django.forms.fields.CharField object>}
declared_fields = {'new_password1': <django.forms.fields.CharField object>, 'new_password2': <django.forms.fields.CharField object>, 'old_password': <django.forms.fields.CharField object>}
property media

Return all media required to render the widgets on this form.

class ndr_core.admin_forms.admin_forms.NdrCoreLoginForm(*args, **kwargs)

Takes Django’s login form and adds a button to it, so it can be rendered with crispy forms

base_fields = {'password': <django.forms.fields.CharField object>, 'username': <django.contrib.auth.forms.UsernameField object>}
declared_fields = {'password': <django.forms.fields.CharField object>, 'username': <django.contrib.auth.forms.UsernameField object>}
property media

Return all media required to render the widgets on this form.

class ndr_core.admin_forms.admin_forms.UploadGoogleVerificationFileForm(*args, **kwargs)

A Form to upload a Google Search Console verification file.

base_fields = {'file': <django.forms.fields.FileField object>}
declared_fields = {'file': <django.forms.fields.FileField object>}
property media

Return all media required to render the widgets on this form.

ndr_core.admin_forms.admin_forms.get_form_buttons(submit_text, include_save_and_continue=False)

Returns a button holder with a submit button with the given text. This is a convenience function for all forms that are used in the NDRCore admin interface.

Args:

submit_text: Text for the primary submit button include_save_and_continue: If True, adds a “Save and keep editing” button

ndr_core.admin_forms.admin_forms.get_info_box(text, item_id='id_info_box', box_id='info_box')

Returns an info box with the given text. This is a convenience function for all forms that are used in the NDRCore admin interface.