Skip to content

Commit f3475c3

Browse files
committed
Update docs
1 parent c6d0d13 commit f3475c3

13 files changed

Lines changed: 3647 additions & 3125 deletions

File tree

README.md

Lines changed: 379 additions & 542 deletions
Large diffs are not rendered by default.

docs/build.py

Lines changed: 21 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -312,24 +312,6 @@ def get_sections():
312312
"name": "Settings",
313313
"url": "#settings",
314314
},
315-
{
316-
"name": "Dashboard Widget Admins",
317-
"url": "#dashboard-widget-admins",
318-
"children": [
319-
{
320-
"name": "Registering Widgets",
321-
"url": "#registering-widgets",
322-
},
323-
{
324-
"name": "Methods and Attributes",
325-
"url": "#widget-methods-and-attributes",
326-
},
327-
{
328-
"name": "Chart Types",
329-
"url": "#widget-chart-types",
330-
},
331-
],
332-
},
333315
{
334316
"name": "Model Admins",
335317
"url": "#model-admins",
@@ -366,6 +348,24 @@ def get_sections():
366348
},
367349
],
368350
},
351+
{
352+
"name": "Dashboard Widget Admins",
353+
"url": "#dashboard-widget-admins",
354+
"children": [
355+
{
356+
"name": "Registering Widgets",
357+
"url": "#registering-widgets",
358+
},
359+
{
360+
"name": "Methods and Attributes",
361+
"url": "#widget-methods-and-attributes",
362+
},
363+
{
364+
"name": "Chart Types",
365+
"url": "#widget-chart-types",
366+
},
367+
],
368+
},
369369
{
370370
"name": "Changelog",
371371
"url": "#changelog",
@@ -501,14 +501,7 @@ def get_page_context(page_url):
501501
"content": [
502502
{
503503
"type": "code-python",
504-
"content": """from fastapi import FastAPI
505-
506-
from fastadmin import fastapi_app as admin_app
507-
508-
app = FastAPI()
509-
510-
app.mount("/admin", admin_app)
511-
""",
504+
"content": read_example("examples/fastapi_tortoiseorm/example.py"),
512505
}
513506
],
514507
},
@@ -518,15 +511,7 @@ def get_page_context(page_url):
518511
"content": [
519512
{
520513
"type": "code-python",
521-
"content": """from django.urls import path
522-
523-
from fastadmin import get_django_admin_urls as get_admin_urls
524-
from fastadmin.settings import settings
525-
526-
urlpatterns = [
527-
path(f"{settings.ADMIN_PREFIX}/", get_admin_urls()),
528-
]
529-
""",
514+
"content": read_example("examples/django_djangoorm/dev/urls.py"),
530515
}
531516
],
532517
},
@@ -536,14 +521,7 @@ def get_page_context(page_url):
536521
"content": [
537522
{
538523
"type": "code-python",
539-
"content": """from flask import Flask
540-
541-
from fastadmin import flask_app as admin_app
542-
543-
app = Flask(__name__)
544-
545-
app.register_blueprint(admin_app, url_prefix="/admin")
546-
""",
524+
"content": read_example("examples/flask_sqlalchemy/example.py"),
547525
}
548526
],
549527
},

docs/code/__init__.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/code/quick_tutorial/__init__.py

Whitespace-only changes.

docs/code/quick_tutorial/django.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/code/quick_tutorial/djangoorm.py

Lines changed: 0 additions & 35 deletions
This file was deleted.

docs/code/quick_tutorial/fastapi.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/code/quick_tutorial/flask.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/code/quick_tutorial/ponyorm.py

Lines changed: 0 additions & 56 deletions
This file was deleted.

docs/code/quick_tutorial/sqlalchemy.py

Lines changed: 0 additions & 68 deletions
This file was deleted.

0 commit comments

Comments
 (0)