瀏覽代碼

add django solo models for plugin config

Nick Sweeting 1 年之前
父節點
當前提交
0f5cc7809e

+ 12 - 0
archivebox/plugins/replaywebpage/models.py

@@ -0,0 +1,12 @@
+# from solo.models import SingletonModel
+
+
+# class ReplayWebPageConfiguration(SingletonModel):
+#     site_name = models.CharField(max_length=255, default='Site Name')
+#     maintenance_mode = models.BooleanField(default=False)
+
+#     def __str__(self):
+#         return "Site Configuration"
+
+#     class Meta:
+#         verbose_name = "Site Configuration"

+ 0 - 1
archivebox/plugins/replaywebpage/templates/plugin_replaywebpage__viewer.html

@@ -13,7 +13,6 @@
                 height: 100%;
                 background-color: #ddd;
             }
-            
         </style>
     </head>
     <body>

+ 23 - 0
pdm.lock

@@ -316,6 +316,19 @@ files = [
     {file = "django_extensions-3.1.5-py3-none-any.whl", hash = "sha256:9238b9e016bb0009d621e05cf56ea8ce5cce9b32e91ad2026996a7377ca28069"},
 ]
 
+[[package]]
+name = "django-solo"
+version = "2.0.0"
+requires_python = ">=3.6"
+summary = "Django Solo helps working with singletons"
+dependencies = [
+    "django>=2.2",
+]
+files = [
+    {file = "django-solo-2.0.0.tar.gz", hash = "sha256:7c6dbe04ae858a4645b580ec83a31a960a067ad4525d8227cca50b7fc5983a62"},
+    {file = "django_solo-2.0.0-py3-none-any.whl", hash = "sha256:9046eca738f2ed64dbef38c2107a02af1065a8899b4f9fabf61b06b8325de1b4"},
+]
+
 [[package]]
 name = "exceptiongroup"
 version = "1.2.0"
@@ -659,6 +672,16 @@ files = [
     {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"},
 ]
 
+[[package]]
+name = "setuptools"
+version = "69.0.3"
+requires_python = ">=3.8"
+summary = "Easily download, build, install, upgrade, and uninstall Python packages"
+files = [
+    {file = "setuptools-69.0.3-py3-none-any.whl", hash = "sha256:385eb4edd9c9d5c17540511303e39a147ce2fc04bc55289c322b9e5904fe2c05"},
+    {file = "setuptools-69.0.3.tar.gz", hash = "sha256:be1af57fc409f93647f2e8e4573a142ed38724b8cdd389706a867bb4efcf1e78"},
+]
+
 [[package]]
 name = "six"
 version = "1.16.0"

+ 1 - 0
pyproject.toml

@@ -22,6 +22,7 @@ dependencies = [
     "w3lib>=1.22.0",
     "yt-dlp>=2023.10.13",
     # "playwright>=1.39.0; platform_machine != 'armv7l'",
+    "django-solo>=2.0.0",
 ]
 classifiers = [
     "Development Status :: 4 - Beta",