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

Automatically import widgets #33

Merged
merged 8 commits into from
Jul 12, 2024
Merged

Conversation

ClmntBcqt
Copy link
Contributor

PR for issue #16

@ClmntBcqt ClmntBcqt changed the title Feat 16 automatically import widgets Automatically import widgets Jul 10, 2024
README.md Outdated

`./manage.py list-widgets` to list all widgets found in content directories

`./manage.py make-widgets` to make a file that groups all jinja2 widgets macros for easier includes. It is called by `runserver` and `distill-local` commands. \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is called by runserveranddistill-local commands.
-> It is automatically called by runserveranddistill-local commands.

@@ -0,0 +1,8 @@
import importlib
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why you added the distill-local command. Is this a way to override the default distill-local command? If so, add a command explaining that the reason for this command to be locally defined is only to add the call to make-widgets as a precommand.


n = 0
for template_dir in settings.JFME_TEMPLATES_DIRS :
for widget in (template_dir / options["engine"] / "widgets").rglob("*") :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like a widget is a file, here. What I expected is a list of all "macro" (actually, there may be several macro in one file, doesn't it?)

@ClmntBcqt ClmntBcqt merged commit 7318a06 into main Jul 12, 2024
2 checks passed
@ClmntBcqt ClmntBcqt deleted the feat__16_automatically_import_widgets branch July 12, 2024 15:16
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