createsonline 0.1.26__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.
- createsonline/__init__.py +46 -0
- createsonline/admin/__init__.py +7 -0
- createsonline/admin/content.py +526 -0
- createsonline/admin/crud.py +805 -0
- createsonline/admin/field_builder.py +559 -0
- createsonline/admin/integration.py +482 -0
- createsonline/admin/interface.py +2562 -0
- createsonline/admin/model_creator.py +513 -0
- createsonline/admin/model_manager.py +388 -0
- createsonline/admin/modern_dashboard.py +498 -0
- createsonline/admin/permissions.py +264 -0
- createsonline/admin/user_forms.py +594 -0
- createsonline/ai/__init__.py +202 -0
- createsonline/ai/fields.py +1226 -0
- createsonline/ai/orm.py +325 -0
- createsonline/ai/services.py +1244 -0
- createsonline/app.py +506 -0
- createsonline/auth/__init__.py +8 -0
- createsonline/auth/management.py +228 -0
- createsonline/auth/models.py +552 -0
- createsonline/cli/__init__.py +5 -0
- createsonline/cli/commands/__init__.py +122 -0
- createsonline/cli/commands/database.py +416 -0
- createsonline/cli/commands/info.py +173 -0
- createsonline/cli/commands/initdb.py +218 -0
- createsonline/cli/commands/project.py +545 -0
- createsonline/cli/commands/serve.py +173 -0
- createsonline/cli/commands/shell.py +93 -0
- createsonline/cli/commands/users.py +148 -0
- createsonline/cli/main.py +2041 -0
- createsonline/cli/manage.py +274 -0
- createsonline/config/__init__.py +9 -0
- createsonline/config/app.py +2577 -0
- createsonline/config/database.py +179 -0
- createsonline/config/docs.py +384 -0
- createsonline/config/errors.py +160 -0
- createsonline/config/orm.py +43 -0
- createsonline/config/request.py +93 -0
- createsonline/config/settings.py +176 -0
- createsonline/data/__init__.py +23 -0
- createsonline/data/dataframe.py +925 -0
- createsonline/data/io.py +453 -0
- createsonline/data/series.py +557 -0
- createsonline/database/__init__.py +60 -0
- createsonline/database/abstraction.py +440 -0
- createsonline/database/assistant.py +585 -0
- createsonline/database/fields.py +442 -0
- createsonline/database/migrations.py +132 -0
- createsonline/database/models.py +604 -0
- createsonline/database.py +438 -0
- createsonline/http/__init__.py +28 -0
- createsonline/http/client.py +535 -0
- createsonline/ml/__init__.py +55 -0
- createsonline/ml/classification.py +552 -0
- createsonline/ml/clustering.py +680 -0
- createsonline/ml/metrics.py +542 -0
- createsonline/ml/neural.py +560 -0
- createsonline/ml/preprocessing.py +784 -0
- createsonline/ml/regression.py +501 -0
- createsonline/performance/__init__.py +19 -0
- createsonline/performance/cache.py +444 -0
- createsonline/performance/compression.py +335 -0
- createsonline/performance/core.py +419 -0
- createsonline/project_init.py +789 -0
- createsonline/routing.py +528 -0
- createsonline/security/__init__.py +34 -0
- createsonline/security/core.py +811 -0
- createsonline/security/encryption.py +349 -0
- createsonline/server.py +295 -0
- createsonline/static/css/admin.css +263 -0
- createsonline/static/css/common.css +358 -0
- createsonline/static/css/dashboard.css +89 -0
- createsonline/static/favicon.ico +0 -0
- createsonline/static/icons/icon-128x128.png +0 -0
- createsonline/static/icons/icon-128x128.webp +0 -0
- createsonline/static/icons/icon-16x16.png +0 -0
- createsonline/static/icons/icon-16x16.webp +0 -0
- createsonline/static/icons/icon-180x180.png +0 -0
- createsonline/static/icons/icon-180x180.webp +0 -0
- createsonline/static/icons/icon-192x192.png +0 -0
- createsonline/static/icons/icon-192x192.webp +0 -0
- createsonline/static/icons/icon-256x256.png +0 -0
- createsonline/static/icons/icon-256x256.webp +0 -0
- createsonline/static/icons/icon-32x32.png +0 -0
- createsonline/static/icons/icon-32x32.webp +0 -0
- createsonline/static/icons/icon-384x384.png +0 -0
- createsonline/static/icons/icon-384x384.webp +0 -0
- createsonline/static/icons/icon-48x48.png +0 -0
- createsonline/static/icons/icon-48x48.webp +0 -0
- createsonline/static/icons/icon-512x512.png +0 -0
- createsonline/static/icons/icon-512x512.webp +0 -0
- createsonline/static/icons/icon-64x64.png +0 -0
- createsonline/static/icons/icon-64x64.webp +0 -0
- createsonline/static/image/android-chrome-192x192.png +0 -0
- createsonline/static/image/android-chrome-512x512.png +0 -0
- createsonline/static/image/apple-touch-icon.png +0 -0
- createsonline/static/image/favicon-16x16.png +0 -0
- createsonline/static/image/favicon-32x32.png +0 -0
- createsonline/static/image/favicon.ico +0 -0
- createsonline/static/image/favicon.svg +17 -0
- createsonline/static/image/icon-128x128.png +0 -0
- createsonline/static/image/icon-128x128.webp +0 -0
- createsonline/static/image/icon-16x16.png +0 -0
- createsonline/static/image/icon-16x16.webp +0 -0
- createsonline/static/image/icon-180x180.png +0 -0
- createsonline/static/image/icon-180x180.webp +0 -0
- createsonline/static/image/icon-192x192.png +0 -0
- createsonline/static/image/icon-192x192.webp +0 -0
- createsonline/static/image/icon-256x256.png +0 -0
- createsonline/static/image/icon-256x256.webp +0 -0
- createsonline/static/image/icon-32x32.png +0 -0
- createsonline/static/image/icon-32x32.webp +0 -0
- createsonline/static/image/icon-384x384.png +0 -0
- createsonline/static/image/icon-384x384.webp +0 -0
- createsonline/static/image/icon-48x48.png +0 -0
- createsonline/static/image/icon-48x48.webp +0 -0
- createsonline/static/image/icon-512x512.png +0 -0
- createsonline/static/image/icon-512x512.webp +0 -0
- createsonline/static/image/icon-64x64.png +0 -0
- createsonline/static/image/icon-64x64.webp +0 -0
- createsonline/static/image/logo-header-h100.png +0 -0
- createsonline/static/image/logo-header-h100.webp +0 -0
- createsonline/static/image/logo-header-h200@2x.png +0 -0
- createsonline/static/image/logo-header-h200@2x.webp +0 -0
- createsonline/static/image/logo.png +0 -0
- createsonline/static/js/admin.js +274 -0
- createsonline/static/site.webmanifest +35 -0
- createsonline/static/templates/admin/base.html +87 -0
- createsonline/static/templates/admin/dashboard.html +217 -0
- createsonline/static/templates/admin/model_form.html +270 -0
- createsonline/static/templates/admin/model_list.html +202 -0
- createsonline/static/test_script.js +15 -0
- createsonline/static/test_styles.css +59 -0
- createsonline/static_files.py +365 -0
- createsonline/templates/404.html +100 -0
- createsonline/templates/admin_login.html +169 -0
- createsonline/templates/base.html +102 -0
- createsonline/templates/index.html +151 -0
- createsonline/templates.py +205 -0
- createsonline/testing.py +322 -0
- createsonline/utils.py +448 -0
- createsonline/validation/__init__.py +49 -0
- createsonline/validation/fields.py +598 -0
- createsonline/validation/models.py +504 -0
- createsonline/validation/validators.py +561 -0
- createsonline/views.py +184 -0
- createsonline-0.1.26.dist-info/METADATA +46 -0
- createsonline-0.1.26.dist-info/RECORD +152 -0
- createsonline-0.1.26.dist-info/WHEEL +5 -0
- createsonline-0.1.26.dist-info/entry_points.txt +2 -0
- createsonline-0.1.26.dist-info/licenses/LICENSE +21 -0
- createsonline-0.1.26.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
# createsonline/admin/model_manager.py
|
|
2
|
+
"""
|
|
3
|
+
Model Manager - View and edit model structure (fields, relationships)
|
|
4
|
+
"""
|
|
5
|
+
from typing import Dict, Any
|
|
6
|
+
from sqlalchemy import inspect as sql_inspect
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ModelManager:
|
|
10
|
+
"""Manage model structure - view/edit fields and relationships"""
|
|
11
|
+
|
|
12
|
+
def __init__(self, model_class, admin_site):
|
|
13
|
+
self.model_class = model_class
|
|
14
|
+
self.admin_site = admin_site
|
|
15
|
+
self.model_name = model_class.__name__
|
|
16
|
+
|
|
17
|
+
async def render(self, request) -> str:
|
|
18
|
+
"""Render model structure management page"""
|
|
19
|
+
|
|
20
|
+
# Get model information
|
|
21
|
+
mapper = sql_inspect(self.model_class)
|
|
22
|
+
|
|
23
|
+
# Get columns (fields)
|
|
24
|
+
fields_html = ""
|
|
25
|
+
for column in mapper.columns:
|
|
26
|
+
field_type = type(column.type).__name__
|
|
27
|
+
field_length = getattr(column.type, 'length', '')
|
|
28
|
+
length_display = f"({field_length})" if field_length else ""
|
|
29
|
+
|
|
30
|
+
nullable = "NULL" if column.nullable else "NOT NULL"
|
|
31
|
+
primary_key = "PRIMARY KEY" if column.primary_key else ""
|
|
32
|
+
unique = "UNIQUE" if column.unique else ""
|
|
33
|
+
|
|
34
|
+
badges = ""
|
|
35
|
+
if primary_key:
|
|
36
|
+
badges += '<span class="badge badge-primary">PK</span>'
|
|
37
|
+
if unique and not primary_key:
|
|
38
|
+
badges += '<span class="badge badge-unique">UNIQUE</span>'
|
|
39
|
+
if not column.nullable:
|
|
40
|
+
badges += '<span class="badge badge-required">REQUIRED</span>'
|
|
41
|
+
|
|
42
|
+
fields_html += f"""
|
|
43
|
+
<tr>
|
|
44
|
+
<td><strong>{column.name}</strong></td>
|
|
45
|
+
<td>{field_type}{length_display}</td>
|
|
46
|
+
<td>{badges}</td>
|
|
47
|
+
<td>
|
|
48
|
+
<a href="/admin/model-manager/{self.model_name.lower()}/field/{column.name}/edit" class="btn-small">Edit</a>
|
|
49
|
+
{'' if column.primary_key else '<a href="/admin/model-manager/' + self.model_name.lower() + '/field/' + column.name + '/delete" class="btn-small btn-danger">Delete</a>'}
|
|
50
|
+
</td>
|
|
51
|
+
</tr>
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
# Get relationships
|
|
55
|
+
relationships_html = ""
|
|
56
|
+
for rel in mapper.relationships:
|
|
57
|
+
rel_type = "One-to-Many" if rel.uselist else "Many-to-One"
|
|
58
|
+
target = rel.mapper.class_.__name__
|
|
59
|
+
|
|
60
|
+
relationships_html += f"""
|
|
61
|
+
<tr>
|
|
62
|
+
<td><strong>{rel.key}</strong></td>
|
|
63
|
+
<td>{target}</td>
|
|
64
|
+
<td><span class="badge badge-relation">{rel_type}</span></td>
|
|
65
|
+
<td>
|
|
66
|
+
<a href="/admin/model-manager/{self.model_name.lower()}/relationship/{rel.key}/edit" class="btn-small">Edit</a>
|
|
67
|
+
<a href="/admin/model-manager/{self.model_name.lower()}/relationship/{rel.key}/delete" class="btn-small btn-danger">Delete</a>
|
|
68
|
+
</td>
|
|
69
|
+
</tr>
|
|
70
|
+
"""
|
|
71
|
+
|
|
72
|
+
if not relationships_html:
|
|
73
|
+
relationships_html = '<tr><td colspan="4" style="text-align: center; padding: 30px; color: #888;">No relationships defined</td></tr>'
|
|
74
|
+
|
|
75
|
+
# Get record count
|
|
76
|
+
from createsonline.admin.integration import get_database_session
|
|
77
|
+
session = get_database_session()
|
|
78
|
+
record_count = 0
|
|
79
|
+
if session:
|
|
80
|
+
try:
|
|
81
|
+
record_count = session.query(self.model_class).count()
|
|
82
|
+
session.close()
|
|
83
|
+
except:
|
|
84
|
+
pass
|
|
85
|
+
|
|
86
|
+
html = f"""<!DOCTYPE html>
|
|
87
|
+
<html lang="en">
|
|
88
|
+
<head>
|
|
89
|
+
<meta charset="UTF-8">
|
|
90
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
91
|
+
<title>Manage {self.model_name} Model - CREATESONLINE Admin</title>
|
|
92
|
+
<style>
|
|
93
|
+
* {{
|
|
94
|
+
margin: 0;
|
|
95
|
+
padding: 0;
|
|
96
|
+
box-sizing: border-box;
|
|
97
|
+
}}
|
|
98
|
+
|
|
99
|
+
body {{
|
|
100
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
101
|
+
background: #ffffff;
|
|
102
|
+
color: #000000;
|
|
103
|
+
padding: 0;
|
|
104
|
+
}}
|
|
105
|
+
|
|
106
|
+
.container {{
|
|
107
|
+
max-width: 1200px;
|
|
108
|
+
margin: 0 auto;
|
|
109
|
+
padding: 20px;
|
|
110
|
+
}}
|
|
111
|
+
|
|
112
|
+
.header {{
|
|
113
|
+
background: #000000;
|
|
114
|
+
color: #ffffff;
|
|
115
|
+
padding: 20px 40px;
|
|
116
|
+
border-radius: 12px;
|
|
117
|
+
margin-bottom: 30px;
|
|
118
|
+
}}
|
|
119
|
+
|
|
120
|
+
.logo {{
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
gap: 15px;
|
|
124
|
+
margin-bottom: 15px;
|
|
125
|
+
}}
|
|
126
|
+
|
|
127
|
+
.logo img {{
|
|
128
|
+
height: 40px;
|
|
129
|
+
}}
|
|
130
|
+
|
|
131
|
+
h1 {{
|
|
132
|
+
font-size: 2em;
|
|
133
|
+
margin-bottom: 10px;
|
|
134
|
+
}}
|
|
135
|
+
|
|
136
|
+
.breadcrumb {{
|
|
137
|
+
color: #888;
|
|
138
|
+
font-size: 0.9em;
|
|
139
|
+
}}
|
|
140
|
+
|
|
141
|
+
.breadcrumb a {{
|
|
142
|
+
color: #fff;
|
|
143
|
+
text-decoration: none;
|
|
144
|
+
}}
|
|
145
|
+
|
|
146
|
+
.stats-grid {{
|
|
147
|
+
display: grid;
|
|
148
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
149
|
+
gap: 20px;
|
|
150
|
+
margin-bottom: 30px;
|
|
151
|
+
}}
|
|
152
|
+
|
|
153
|
+
.stat-card {{
|
|
154
|
+
background: #f5f5f5;
|
|
155
|
+
padding: 20px;
|
|
156
|
+
border-radius: 8px;
|
|
157
|
+
border: 2px solid #e0e0e0;
|
|
158
|
+
}}
|
|
159
|
+
|
|
160
|
+
.stat-label {{
|
|
161
|
+
color: #666;
|
|
162
|
+
font-size: 0.9em;
|
|
163
|
+
margin-bottom: 5px;
|
|
164
|
+
}}
|
|
165
|
+
|
|
166
|
+
.stat-value {{
|
|
167
|
+
font-size: 2em;
|
|
168
|
+
font-weight: 700;
|
|
169
|
+
color: #000;
|
|
170
|
+
}}
|
|
171
|
+
|
|
172
|
+
.section {{
|
|
173
|
+
background: #ffffff;
|
|
174
|
+
padding: 30px;
|
|
175
|
+
border-radius: 12px;
|
|
176
|
+
border: 2px solid #e0e0e0;
|
|
177
|
+
margin-bottom: 30px;
|
|
178
|
+
}}
|
|
179
|
+
|
|
180
|
+
.section-header {{
|
|
181
|
+
display: flex;
|
|
182
|
+
justify-content: space-between;
|
|
183
|
+
align-items: center;
|
|
184
|
+
margin-bottom: 20px;
|
|
185
|
+
padding-bottom: 15px;
|
|
186
|
+
border-bottom: 2px solid #e0e0e0;
|
|
187
|
+
}}
|
|
188
|
+
|
|
189
|
+
h2 {{
|
|
190
|
+
font-size: 1.5em;
|
|
191
|
+
color: #000;
|
|
192
|
+
}}
|
|
193
|
+
|
|
194
|
+
.btn {{
|
|
195
|
+
padding: 10px 20px;
|
|
196
|
+
border: none;
|
|
197
|
+
border-radius: 8px;
|
|
198
|
+
font-weight: 600;
|
|
199
|
+
cursor: pointer;
|
|
200
|
+
text-decoration: none;
|
|
201
|
+
display: inline-block;
|
|
202
|
+
transition: all 0.2s;
|
|
203
|
+
}}
|
|
204
|
+
|
|
205
|
+
.btn-primary {{
|
|
206
|
+
background: #000000;
|
|
207
|
+
color: #ffffff;
|
|
208
|
+
}}
|
|
209
|
+
|
|
210
|
+
.btn-primary:hover {{
|
|
211
|
+
background: #333333;
|
|
212
|
+
}}
|
|
213
|
+
|
|
214
|
+
.btn-secondary {{
|
|
215
|
+
background: #f5f5f5;
|
|
216
|
+
color: #000;
|
|
217
|
+
border: 2px solid #e0e0e0;
|
|
218
|
+
}}
|
|
219
|
+
|
|
220
|
+
.btn-secondary:hover {{
|
|
221
|
+
background: #e0e0e0;
|
|
222
|
+
}}
|
|
223
|
+
|
|
224
|
+
table {{
|
|
225
|
+
width: 100%;
|
|
226
|
+
border-collapse: collapse;
|
|
227
|
+
}}
|
|
228
|
+
|
|
229
|
+
th {{
|
|
230
|
+
text-align: left;
|
|
231
|
+
padding: 12px;
|
|
232
|
+
background: #f5f5f5;
|
|
233
|
+
border-bottom: 2px solid #e0e0e0;
|
|
234
|
+
font-weight: 600;
|
|
235
|
+
color: #000;
|
|
236
|
+
}}
|
|
237
|
+
|
|
238
|
+
td {{
|
|
239
|
+
padding: 12px;
|
|
240
|
+
border-bottom: 1px solid #f0f0f0;
|
|
241
|
+
}}
|
|
242
|
+
|
|
243
|
+
tr:hover {{
|
|
244
|
+
background: #fafafa;
|
|
245
|
+
}}
|
|
246
|
+
|
|
247
|
+
.badge {{
|
|
248
|
+
display: inline-block;
|
|
249
|
+
padding: 4px 10px;
|
|
250
|
+
border-radius: 4px;
|
|
251
|
+
font-size: 0.8em;
|
|
252
|
+
font-weight: 600;
|
|
253
|
+
margin-right: 5px;
|
|
254
|
+
}}
|
|
255
|
+
|
|
256
|
+
.badge-primary {{
|
|
257
|
+
background: #000;
|
|
258
|
+
color: #fff;
|
|
259
|
+
}}
|
|
260
|
+
|
|
261
|
+
.badge-unique {{
|
|
262
|
+
background: #666;
|
|
263
|
+
color: #fff;
|
|
264
|
+
}}
|
|
265
|
+
|
|
266
|
+
.badge-required {{
|
|
267
|
+
background: #333;
|
|
268
|
+
color: #fff;
|
|
269
|
+
}}
|
|
270
|
+
|
|
271
|
+
.badge-relation {{
|
|
272
|
+
background: #999;
|
|
273
|
+
color: #fff;
|
|
274
|
+
}}
|
|
275
|
+
|
|
276
|
+
.btn-small {{
|
|
277
|
+
padding: 6px 12px;
|
|
278
|
+
background: #000;
|
|
279
|
+
color: #fff;
|
|
280
|
+
border: none;
|
|
281
|
+
border-radius: 6px;
|
|
282
|
+
text-decoration: none;
|
|
283
|
+
font-size: 0.85em;
|
|
284
|
+
margin-right: 5px;
|
|
285
|
+
display: inline-block;
|
|
286
|
+
transition: all 0.2s;
|
|
287
|
+
}}
|
|
288
|
+
|
|
289
|
+
.btn-small:hover {{
|
|
290
|
+
background: #333;
|
|
291
|
+
}}
|
|
292
|
+
|
|
293
|
+
.btn-danger {{
|
|
294
|
+
background: #ff0000;
|
|
295
|
+
}}
|
|
296
|
+
|
|
297
|
+
.btn-danger:hover {{
|
|
298
|
+
background: #cc0000;
|
|
299
|
+
}}
|
|
300
|
+
|
|
301
|
+
.actions {{
|
|
302
|
+
display: flex;
|
|
303
|
+
gap: 10px;
|
|
304
|
+
margin-top: 20px;
|
|
305
|
+
}}
|
|
306
|
+
</style>
|
|
307
|
+
</head>
|
|
308
|
+
<body>
|
|
309
|
+
<div class="container">
|
|
310
|
+
<div class="header">
|
|
311
|
+
<div class="logo">
|
|
312
|
+
<img src="/logo.png" alt="Logo" onerror="this.style.display='none'">
|
|
313
|
+
</div>
|
|
314
|
+
<h1>{self.model_name} Model</h1>
|
|
315
|
+
<div class="breadcrumb">
|
|
316
|
+
<a href="/admin">Admin</a> /
|
|
317
|
+
<a href="/admin">Models</a> /
|
|
318
|
+
{self.model_name}
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
|
|
322
|
+
<div class="stats-grid">
|
|
323
|
+
<div class="stat-card">
|
|
324
|
+
<div class="stat-label">Total Records</div>
|
|
325
|
+
<div class="stat-value">{record_count}</div>
|
|
326
|
+
</div>
|
|
327
|
+
<div class="stat-card">
|
|
328
|
+
<div class="stat-label">Fields</div>
|
|
329
|
+
<div class="stat-value">{len(mapper.columns)}</div>
|
|
330
|
+
</div>
|
|
331
|
+
<div class="stat-card">
|
|
332
|
+
<div class="stat-label">Relationships</div>
|
|
333
|
+
<div class="stat-value">{len(mapper.relationships)}</div>
|
|
334
|
+
</div>
|
|
335
|
+
</div>
|
|
336
|
+
|
|
337
|
+
<div class="actions">
|
|
338
|
+
<a href="/admin/{self.model_name.lower()}" class="btn btn-primary">📋 View Records</a>
|
|
339
|
+
<a href="/admin/{self.model_name.lower()}/add" class="btn btn-secondary">+ Add Record</a>
|
|
340
|
+
<a href="/admin" class="btn btn-secondary">← Back to Dashboard</a>
|
|
341
|
+
</div>
|
|
342
|
+
|
|
343
|
+
<div class="section">
|
|
344
|
+
<div class="section-header">
|
|
345
|
+
<h2>Fields</h2>
|
|
346
|
+
<a href="/admin/model-manager/{self.model_name.lower()}/field/add" class="btn btn-primary">+ Add Field</a>
|
|
347
|
+
</div>
|
|
348
|
+
|
|
349
|
+
<table>
|
|
350
|
+
<thead>
|
|
351
|
+
<tr>
|
|
352
|
+
<th>Field Name</th>
|
|
353
|
+
<th>Type</th>
|
|
354
|
+
<th>Constraints</th>
|
|
355
|
+
<th>Actions</th>
|
|
356
|
+
</tr>
|
|
357
|
+
</thead>
|
|
358
|
+
<tbody>
|
|
359
|
+
{fields_html}
|
|
360
|
+
</tbody>
|
|
361
|
+
</table>
|
|
362
|
+
</div>
|
|
363
|
+
|
|
364
|
+
<div class="section">
|
|
365
|
+
<div class="section-header">
|
|
366
|
+
<h2>Relationships</h2>
|
|
367
|
+
<a href="/admin/model-manager/{self.model_name.lower()}/relationship/add" class="btn btn-primary">+ Add Relationship</a>
|
|
368
|
+
</div>
|
|
369
|
+
|
|
370
|
+
<table>
|
|
371
|
+
<thead>
|
|
372
|
+
<tr>
|
|
373
|
+
<th>Relationship Name</th>
|
|
374
|
+
<th>Target Model</th>
|
|
375
|
+
<th>Type</th>
|
|
376
|
+
<th>Actions</th>
|
|
377
|
+
</tr>
|
|
378
|
+
</thead>
|
|
379
|
+
<tbody>
|
|
380
|
+
{relationships_html}
|
|
381
|
+
</tbody>
|
|
382
|
+
</table>
|
|
383
|
+
</div>
|
|
384
|
+
</div>
|
|
385
|
+
</body>
|
|
386
|
+
</html>
|
|
387
|
+
"""
|
|
388
|
+
return html
|