django-content-studio 1.0.0b11__py3-none-any.whl → 1.0.0b12__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.
- content_studio/__init__.py +1 -1
- content_studio/admin.py +2 -0
- content_studio/extensions.py +69 -0
- content_studio/static/content_studio/assets/index.js +67 -67
- content_studio/static/content_studio/index.html +22 -0
- content_studio/static/content_studio/locales/en/translation.json +3 -1
- content_studio/static/content_studio/locales/nl/translation.json +3 -1
- content_studio/static/content_studio/vite.svg +1 -0
- content_studio/views.py +7 -0
- {django_content_studio-1.0.0b11.dist-info → django_content_studio-1.0.0b12.dist-info}/METADATA +1 -1
- {django_content_studio-1.0.0b11.dist-info → django_content_studio-1.0.0b12.dist-info}/RECORD +13 -10
- {django_content_studio-1.0.0b11.dist-info → django_content_studio-1.0.0b12.dist-info}/LICENSE +0 -0
- {django_content_studio-1.0.0b11.dist-info → django_content_studio-1.0.0b12.dist-info}/WHEEL +0 -0
content_studio/__init__.py
CHANGED
content_studio/admin.py
CHANGED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import uuid
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class BaseExtension:
|
|
5
|
+
extension_type: str
|
|
6
|
+
extension_id: uuid.UUID
|
|
7
|
+
|
|
8
|
+
def __init__(self):
|
|
9
|
+
self.extension_id = uuid.uuid4()
|
|
10
|
+
|
|
11
|
+
def serialize(self):
|
|
12
|
+
return {
|
|
13
|
+
"extension_type": self.extension_type,
|
|
14
|
+
"extension_id": str(self.extension_id),
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class MainMenuLink(BaseExtension):
|
|
19
|
+
extension_type = "MainMenuLink"
|
|
20
|
+
url: str
|
|
21
|
+
label: str
|
|
22
|
+
icon: str = None
|
|
23
|
+
color: str = None
|
|
24
|
+
weight: int = 0
|
|
25
|
+
|
|
26
|
+
def __init__(
|
|
27
|
+
self, url: str, label: str, icon: str = None, color: str = None, weight: int = 0
|
|
28
|
+
):
|
|
29
|
+
self.url = url
|
|
30
|
+
self.label = label
|
|
31
|
+
self.icon = icon
|
|
32
|
+
self.color = color
|
|
33
|
+
self.weight = weight
|
|
34
|
+
super().__init__()
|
|
35
|
+
|
|
36
|
+
def serialize(self):
|
|
37
|
+
return {
|
|
38
|
+
**super().serialize(),
|
|
39
|
+
"config": {
|
|
40
|
+
"url": self.url,
|
|
41
|
+
"icon": self.icon,
|
|
42
|
+
"color": self.color,
|
|
43
|
+
"label": self.label,
|
|
44
|
+
},
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class IFramePage(BaseExtension):
|
|
49
|
+
extension_type = "IFramePage"
|
|
50
|
+
path: str
|
|
51
|
+
iframe_url: str
|
|
52
|
+
|
|
53
|
+
def __init__(
|
|
54
|
+
self,
|
|
55
|
+
path: str,
|
|
56
|
+
iframe_url: str,
|
|
57
|
+
):
|
|
58
|
+
self.path = path
|
|
59
|
+
self.iframe_url = iframe_url
|
|
60
|
+
super().__init__()
|
|
61
|
+
|
|
62
|
+
def serialize(self):
|
|
63
|
+
return {
|
|
64
|
+
**super().serialize(),
|
|
65
|
+
"config": {
|
|
66
|
+
"path": self.path,
|
|
67
|
+
"iframe_url": self.iframe_url,
|
|
68
|
+
},
|
|
69
|
+
}
|