django-sqlite-ops 0.1.0a1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ __version__ = "0.0.0"
@@ -0,0 +1,19 @@
1
+ from django.apps import AppConfig
2
+ from django.conf import settings
3
+
4
+
5
+ class SqliteOpsConfig(AppConfig):
6
+ name = "django_sqlite_ops"
7
+ label = "sqlite_ops"
8
+ verbose_name = "SQLite ops"
9
+
10
+ def ready(self) -> None:
11
+ # 체크 등록과 명시적으로 켠 호환 패치만 한다. DB 를 열지 않는다 (DESIGN §5·§9).
12
+ from . import checks
13
+ from .compat import channels_lite
14
+
15
+ checks.register()
16
+ if channels_lite.enabled(getattr(settings, "SQLITE_OPS", {})):
17
+ # 게이트 밖이거나 channels-lite 가 없으면 아무것도 바꾸지 않는다.
18
+ # 사유는 sqlite_doctor 가 알린다.
19
+ channels_lite.apply()
@@ -0,0 +1,4 @@
1
+ """부팅 단계(복원 판정·복원·잠금) 패키지 (DESIGN §4).
2
+
3
+ 복원 전에 DB 파일이 생기지 않도록 이 패키지 전체는 Django 를 import 하지 않는다(DESIGN §4-1).
4
+ """
@@ -0,0 +1,6 @@
1
+ """``python -m django_sqlite_ops.boot`` (DESIGN §4-2). Django 를 import 하지 않는다."""
2
+
3
+ from .cli import main
4
+
5
+ if __name__ == "__main__":
6
+ raise SystemExit(main())