config package

The app that handles configuration.

Subpackages

Submodules

config.admin module

The admin models of the config app.

class config.admin.InfoPageForm(*args, **kwargs)[source]

Bases: FlatpageForm

Admin form for InfoPage.

class Meta[source]

Bases: object

fields = '__all__'
model

alias of FlatPage

widgets = {'content': <MangAdventure.widgets.TinyMCE object>}
base_fields = {'content': <django.forms.CharField object>, 'enable_comments': <django.forms.fields.BooleanField object>, 'registration_required': <django.forms.fields.BooleanField object>, 'sites': <django.forms.models.ModelMultipleChoiceField object>, 'template_name': <django.forms.CharField object>, 'title': <django.forms.CharField object>, 'url': <django.forms.fields.RegexField object>}
declared_fields = {'url': <django.forms.fields.RegexField object>}
class config.admin.InfoPageAdmin(model, admin_site)[source]

Bases: FlatPageAdmin

Admin model for InfoPage.

change_list_template = 'admin/change_list.html'
change_list_form

alias of ModelForm

form

alias of InfoPageForm

fieldsets = ((None, {'fields': ('url', 'title', 'content', 'sites')}),)
readonly_fields = ('url',)
list_filter = ()
has_add_permission(request)[source]

Return whether adding an InfoPage object is permitted.

Parameters:

request (HttpRequest) – The original request.

Return type:

bool

Returns:

Always returns False.

has_delete_permission(request, obj=None)[source]

Return whether deleting an InfoPage object is permitted.

Parameters:
Return type:

bool

Returns:

Always returns False.

class config.admin.InfoPage(*args, **kwargs)[source]

Bases: FlatPage

django.contrib.flatpages.admin.FlatPage proxy model.

exception DoesNotExist

Bases: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

class config.admin.Site(*args, **kwargs)[source]

Bases: Site

django.contrib.sites.models.Site proxy model.

exception DoesNotExist

Bases: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

class config.admin.SiteAdmin(model, admin_site)[source]

Bases: SiteAdmin

Admin model for Site.

change_list_template = 'admin/change_list.html'
change_list_form

alias of ModelForm

has_delete_permission(request, obj=None)[source]

Return whether deleting a Site object is permitted.

Parameters:
Return type:

bool

Returns:

Returns False for the first site, otherwise calls django.contrib.admin.ModelAdmin.has_delete_permission().

class config.admin.Redirect(*args, **kwargs)[source]

Bases: Redirect

django.contrib.redirects.models.Redirect proxy model.

exception DoesNotExist

Bases: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

class config.admin.RedirectAdmin(model, admin_site)[source]

Bases: RedirectAdmin

Admin model for Redirect.

change_list_template = 'admin/change_list.html'
change_list_form

alias of ModelForm

config.apps module

App configuration.

class config.apps.SiteConfig(app_name, app_module)[source]

Bases: AppConfig

Configuration for the config app.

name = 'config'
verbose_name = 'Configuration'
verbose_name_plural = 'Configuration'
ready()[source]

Configure the app when it’s ready.

config.context_processors module

Custom context processors.

config.context_processors.extra_settings(request)[source]

Context processor which defines some settings variables & schemas.

  • MANGADV_VERSION: The current version of MangAdventure.

  • PAGE_URL: The complete absolute URI of the request.

  • CANON_URL: The absolute URI of the request minus the query string.

  • config: A reference to MangAdventure.settings.CONFIG.

  • searchbox: Searchbox JSON-LD schema.

  • organization: Organization JSON-LD schema.

Parameters:

request (HttpRequest) – The current HTTP request.

Return type:

Dict

Returns:

A dictionary containing the variables.

config.urls module

The URLconf of the config app.

config.urls.urlpatterns = [<URLPattern 'info/' [name='info']>, <URLPattern 'privacy/' [name='privacy']>]

The URL patterns of the config app.