Coverage for /var/srv/projects/api.amasfac.comuna18.com/tmp/venv/lib/python3.9/site-packages/mptt/__init__.py: 69%
9 statements
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
« prev ^ index » next coverage.py v6.4.4, created at 2023-07-17 14:22 -0600
1import django
4__version__ = "0.13.4"
5VERSION = tuple(__version__.split("."))
7if django.VERSION < (3, 2): # pragma: no cover 7 ↛ 8line 7 didn't jump to line 8, because the condition on line 7 was never true
8 default_app_config = "mptt.apps.MpttConfig"
11def register(*args, **kwargs):
12 """
13 Registers a model class as an MPTTModel, adding MPTT fields and adding MPTTModel to __bases__.
14 This is equivalent to just subclassing MPTTModel, but works for an already-created model.
15 """
16 from mptt.models import MPTTModelBase
18 return MPTTModelBase.register(*args, **kwargs)
21class AlreadyRegistered(Exception):
22 "Deprecated - don't use this anymore. It's never thrown, you don't need to catch it"