Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

css clean-up, breadcrumbs #769

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

css clean-up, breadcrumbs #769

wants to merge 3 commits into from

Conversation

krmax44
Copy link
Member

@krmax44 krmax44 commented May 13, 2024

upstream changes for okfde/fragdenstaat_de#494

breadcrumbs are now more flexible, type-safe and better documented - simply extend views with the provided class:

class BreadcrumbView(View):
"""
Your view must either provide a `breadcrumbs` attribute, or a
`get_breadcrumbs` method.
The `breadcrumbs` attribute is a sequence of strings or tuples,
e.g. ["Just text", ("A link", "url-pattern-name")].
The first element of the tuple specifies the link text, the second one
will be REVERSED to the link, so you can provide path names.
Using the `get_breadcrumbs` method, you can provide breadcrumbs as
above, with the difference that urls WILL NOT BE REVERSED.
You can also directly return a `Breadcrumbs` instance.
Example implementation:
class MyView(BreadcrumbView):
def get_breadcrumbs():
return [("Foo", "/foo/"), "Bar"]
"""

@krmax44 krmax44 changed the title css clean-up css clean-up, breadcrumbs Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant