File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
piccolo/apps/asgi/commands/templates/app Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 11import typing as t
22
3+ from piccolo_admin.endpoints import create_admin
34from piccolo_api.crud.serializers import create_pydantic_model
45from piccolo.engine import engine_finder
56
@@ -10,11 +11,20 @@ from blacksheep.server.openapi.v3 import OpenAPIHandler
1011from openapidocs.v3 import Info
1112
1213from home.endpoints import home
14+ from home.piccolo_app import APP_CONFIG
1315from home.tables import Task
1416
1517
1618app = Application()
1719
20+ app.mount(
21+ "/admin/",
22+ create_admin(
23+ tables=APP_CONFIG.table_classes,
24+ # Required when running under HTTPS:
25+ # allowed_hosts=['my_site.com']
26+ ),
27+ )
1828
1929docs = OpenAPIHandler(info=Info(title="Example API", version="0.0.1"))
2030docs.bind_app(app)
Original file line number Diff line number Diff line change 4848 </ul>
4949 <h3>BlackSheep</h3>
5050 <ul>
51+ <li><a href="/admin/">Admin</a></li>
5152 <li><a href="/docs/">Swagger API</a></li>
5253 </ul>
5354 </section>
You can’t perform that action at this time.
0 commit comments