From c2e3a3e4b277dd5bfe87a77524594ad44fbb2a70 Mon Sep 17 00:00:00 2001 From: baseplate-admin <61817579+baseplate-admin@users.noreply.github.com> Date: Thu, 19 Dec 2024 09:39:15 +0600 Subject: [PATCH] Modernize imports Modernize imports Use strings instead of `_alphabet` Revert "Use strings instead of `_alphabet`" This reverts commit d55c1b3e4f6b4d9fd380f1ad18f7d652534020c9. --- django_ltree/apps.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/django_ltree/apps.py b/django_ltree/apps.py index edd1af8..81b2278 100644 --- a/django_ltree/apps.py +++ b/django_ltree/apps.py @@ -1,17 +1,11 @@ -import importlib - from django.apps import AppConfig -def register_pathfield(): - # Register field checks, lookups and functions - importlib.import_module("django_ltree.checks") - importlib.import_module("django_ltree.lookups") - importlib.import_module("django_ltree.functions") - - class DjangoLtreeConfig(AppConfig): + default_auto_field = "django.db.models.BigAutoField" name = "django_ltree" def ready(self): - register_pathfield() + from . import checks as checks + from . import lookups as lookups + from . import functions as functions