Skip to content

Mounting at "/" doesn't work #33

@andriialbatov

Description

@andriialbatov

Describe the bug

When I mount CRUDAdmin at a custom path (for example /dashboard):

admin = CRUDAdmin(mount_path="/dashboard")
  • The default mount path /admin works correctly, but any custom mount path (such as /dashboard) causes 404s for all internal links, navigation, and redirects.
  • Redirects after login, as well as sidebar navigation, all use the correct custom path prefix but still result in 404 errors.

To Reproduce

  1. Mount CRUDAdmin at a custom path, e.g.:
admin = CRUDAdmin(mount_path="/dashboard")
  1. Start your application and open /dashboard in your browser.
  2. Log in or click on any model/resource in the admin UI.
  3. Observe that /dashboard/User/ (and other internal URLs) result in 404 Not Found errors.

Expected behavior

CRUDAdmin should fully support being mounted at any custom path (not just /admin).
All internal URLs, links, and redirects should work when using a custom mount path and should not result in 404 errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions