setup#

ADR.setup(collect_static: bool = False) None#

Configure Django and perform ADR initialization.

This method:

  • Optionally locates and imports the enve module for geometry.

  • Adds the Nexus Django directory to sys.path and imports the serverless settings module.

  • Builds an overrides dict and calls django.conf.settings.configure().

  • Runs Django migrations for all configured databases.

  • Runs geometry migration/update checks.

  • Optionally collects static files to _static_directory.

  • Creates a default Session and Dataset.

Parameters:
collect_staticbool, optional

If True, run collectstatic into _static_directory.

Raises:
ImportError

If the Nexus Django settings could not be imported.

DatabaseMigrationError

If migrations fail on any database.

GeometryMigrationError

If geometry update checks fail.

ImproperlyConfiguredError

If settings or required paths are invalid.

StaticFilesCollectionError

If collectstatic fails.