focomy 0.1.110__py3-none-any.whl → 0.1.111__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.
- core/api/forms.py +11 -5
- {focomy-0.1.110.dist-info → focomy-0.1.111.dist-info}/METADATA +1 -1
- {focomy-0.1.110.dist-info → focomy-0.1.111.dist-info}/RECORD +6 -6
- {focomy-0.1.110.dist-info → focomy-0.1.111.dist-info}/WHEEL +0 -0
- {focomy-0.1.110.dist-info → focomy-0.1.111.dist-info}/entry_points.txt +0 -0
- {focomy-0.1.110.dist-info → focomy-0.1.111.dist-info}/licenses/LICENSE +0 -0
core/api/forms.py
CHANGED
|
@@ -9,10 +9,10 @@ from pydantic import BaseModel
|
|
|
9
9
|
from sqlalchemy.ext.asyncio import AsyncSession
|
|
10
10
|
|
|
11
11
|
from ..database import get_db
|
|
12
|
+
from ..engine.routes import render_template
|
|
12
13
|
from ..rate_limit import limiter
|
|
13
14
|
from ..services.entity import EntityService
|
|
14
15
|
from ..services.mail import mail_service
|
|
15
|
-
from ..services.theme import theme_service
|
|
16
16
|
from ..utils import require_feature_async
|
|
17
17
|
|
|
18
18
|
router = APIRouter(prefix="/forms", tags=["forms"])
|
|
@@ -63,8 +63,9 @@ async def view_form(
|
|
|
63
63
|
except json.JSONDecodeError:
|
|
64
64
|
steps = []
|
|
65
65
|
|
|
66
|
-
# Render form template
|
|
67
|
-
html =
|
|
66
|
+
# Render form template (with admin bar context)
|
|
67
|
+
html = await render_template(
|
|
68
|
+
db,
|
|
68
69
|
"form.html",
|
|
69
70
|
{
|
|
70
71
|
"form": form_data,
|
|
@@ -72,6 +73,9 @@ async def view_form(
|
|
|
72
73
|
"steps": steps,
|
|
73
74
|
"csrf_token": getattr(request.state, "csrf_token", ""),
|
|
74
75
|
},
|
|
76
|
+
request=request,
|
|
77
|
+
entity=form,
|
|
78
|
+
content_type="form",
|
|
75
79
|
)
|
|
76
80
|
|
|
77
81
|
return HTMLResponse(content=html)
|
|
@@ -162,13 +166,15 @@ async def submit_form(
|
|
|
162
166
|
if "application/json" in content_type:
|
|
163
167
|
return {"success": True, "message": success_message}
|
|
164
168
|
|
|
165
|
-
# Render success page
|
|
166
|
-
html =
|
|
169
|
+
# Render success page (with admin bar context)
|
|
170
|
+
html = await render_template(
|
|
171
|
+
db,
|
|
167
172
|
"form_success.html",
|
|
168
173
|
{
|
|
169
174
|
"form": form_data,
|
|
170
175
|
"message": success_message,
|
|
171
176
|
},
|
|
177
|
+
request=request,
|
|
172
178
|
)
|
|
173
179
|
|
|
174
180
|
return HTMLResponse(content=html)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: focomy
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.111
|
|
4
4
|
Summary: The Most Beautiful CMS - A metadata-driven, zero-duplicate-code content management system
|
|
5
5
|
Project-URL: Homepage, https://github.com/focomy/focomy
|
|
6
6
|
Project-URL: Documentation, https://focomy.dev/docs
|
|
@@ -13,7 +13,7 @@ core/api/__init__.py,sha256=H1StbYGDVRS6g-Jk3UUf17ibAz1K8IUa27NfPMkaNrA,19
|
|
|
13
13
|
core/api/auth.py,sha256=Zb37IHcUSjf8_hXiVzhoZPQw6WAiOOS_AoMqE96yat8,11565
|
|
14
14
|
core/api/comments.py,sha256=Eu_0a_JqgiOP1GPsPoslxDztkCv_M324x9qAuBOWPOE,8397
|
|
15
15
|
core/api/entities.py,sha256=sAS12hgjt0Zgudrq2BzfXdCU25myh-8whUxsU_z_jt8,11766
|
|
16
|
-
core/api/forms.py,sha256=
|
|
16
|
+
core/api/forms.py,sha256=YnGPq0SyQ_O7paJ7kV2EdCUYyq0YUJyYsOX0rkBWFos,5009
|
|
17
17
|
core/api/media.py,sha256=iCsgRBS_-raYK99sksudyAINnTWFl1GhTMBaXJGWkek,6767
|
|
18
18
|
core/api/relations.py,sha256=sErG5lNLBjmWZ5qSXyhGkU7F8iVZAYpFc-_5mY3ZkzU,4874
|
|
19
19
|
core/api/revisions.py,sha256=8BJXtCsq8OJV1R5s33bl369lQrRDNkztWoS0tX70uAA,6960
|
|
@@ -201,8 +201,8 @@ themes/minimal/templates/base.html,sha256=LFkx-XLDMGH7oFHHa0e6KPB0DJITOBvr6GtPkD
|
|
|
201
201
|
themes/minimal/templates/home.html,sha256=ygYQgYj1OGCiKwmfsxwkPselVKT8vDH3jLLbfphpqKI,1577
|
|
202
202
|
themes/minimal/templates/page.html,sha256=7Xcoq-ryaxlp913H2S1ishrAro2wsqqGmvsm1osXxd4,389
|
|
203
203
|
themes/minimal/templates/post.html,sha256=FkTRHci8HNIIi3DU6Mb3oL0aDisGyDcsT_IUDwHmrvo,1387
|
|
204
|
-
focomy-0.1.
|
|
205
|
-
focomy-0.1.
|
|
206
|
-
focomy-0.1.
|
|
207
|
-
focomy-0.1.
|
|
208
|
-
focomy-0.1.
|
|
204
|
+
focomy-0.1.111.dist-info/METADATA,sha256=6a3EmVsy6IOOVUM1wDtGebUVQqnn8Q1K3hVso97veoc,7042
|
|
205
|
+
focomy-0.1.111.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
206
|
+
focomy-0.1.111.dist-info/entry_points.txt,sha256=_rF-wxGI1axY7gox3DBsTLHq-JrFKkMCjA65a6b_oqE,41
|
|
207
|
+
focomy-0.1.111.dist-info/licenses/LICENSE,sha256=z9Z7gN7NNV7zYCaY-Knh3bv8RBCu89VueYtAlN_-lro,1063
|
|
208
|
+
focomy-0.1.111.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|