NotRegistered is a class within the django.contrib.admin.sites module of the Django project.
django-sitetree (project documentation and PyPI package information) is a Django extension that makes it easier for developers to add site trees, menus and breadcrumb navigation elements to their web applications.
The django-sitetree project is provided as open source under the BSD 3-Clause "New" or "Revised" License.
django-sitetree / sitetree / admin.py
# admin.py
from typing import Tuple, Type, Optional
from django import forms
from django.conf import settings as django_settings
from django.conf.urls import url
from django.contrib import admin
from django.contrib import messages
from django.contrib.admin.sites import NotRegistered
from django.http import HttpResponseRedirect, HttpRequest, HttpResponse
from django.urls import get_urlconf, get_resolver
from django.utils.translation import gettext_lazy as _
from .fields import TreeItemChoiceField
from .settings import MODEL_TREE, MODEL_TREE_ITEM
from .utils import get_tree_model, get_tree_item_model, get_app_n_model
if False: # pragma: nocover
from .models import TreeItemBase, TreeBase # noqa
SMUGGLER_INSTALLED = 'smuggler' in django_settings.INSTALLED_APPS
MODEL_TREE_CLASS = get_tree_model()
MODEL_TREE_ITEM_CLASS = get_tree_item_model()
_TREE_ADMIN = lambda: TreeAdmin
_ITEM_ADMIN = lambda: TreeItemAdmin
def get_model_url_name(model_nfo: Tuple[str, str], page: str, with_namespace: bool = False) -> str:
prefix = ''
if with_namespace:
## ... source file continues with no further NotRegistered examples...