|||

Piccolo Admin

Quick search

  • Installation
  • ASGI
  • Authentication
  • Help Text
  • TableConfig
  • Custom Forms
  • Sidebar Links
  • Actions
  • Media Storage
  • Internationalization
  • REST API Documentation
  • Debugging
  • Help
  • API Reference
  • Contributing
  • Changes

Sidebar LinksΒΆ

We can specify custom links in the navigation sidebar. This feature is useful if we want a quick way to get to specific pages with pre-applied filters/sorts, or to any external websites.

../_images/sidebar_links.png

For example:

# app.py
from fastapi import FastAPI
from fastapi.routing import Mount
from piccolo_admin.endpoints import create_admin

from movies.tables import Director, Movie


app = FastAPI(
    routes=[
        Mount(
            path="/admin/",
            app=create_admin(
                tables=[Director, Movie],
                sidebar_links={
                    "Top Movies": "/admin/#/movie?__order=-box_office",
                    "Google": "https://google.com"
                },
            ),
        ),
    ],
)
<Custom Forms
Actions>
© Copyright 2023, Daniel Townsend. Created using Sphinx 5.1.1.

Styled using the Piccolo Theme