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

feat(blocks): callback #52

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

feat(blocks): callback #52

wants to merge 4 commits into from

Conversation

Mte90
Copy link
Contributor

@Mte90 Mte90 commented Nov 6, 2024

Ref: #51

So in my investigation I discovered that the issue is because Unfold register a custom node, CaptureNode so it isn't possible to detect what is the real block as it isn't a Django one.

With this code we are adding a new callback so the dev can implement a way to detect those blocks.
The readme include the code for Unfold theme as example.

django_fastdev/apps.py Outdated Show resolved Hide resolved
@Mte90
Copy link
Contributor Author

Mte90 commented Nov 11, 2024

I need also to add:

        result.add('breadcrumbs')
        result.add('nav-sidebar')
        result.add('usertools')

In this callback to fix the warnings, as I can see in this case they are just blocks https://github.com/search?q=repo%3Aunfoldadmin%2Fdjango-unfold%20usertools&type=code but I think that they are not loaded always just present if the template it will just calls them.

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.

2 participants