-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
…s in Django templates)
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. \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is called by
runserverand
distill-local commands.
-> It is automatically called by
runserverand
distill-local commands.
@@ -0,0 +1,8 @@ | |||
import importlib |
There was a problem hiding this comment.
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("*") : |
There was a problem hiding this comment.
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?)
PR for issue #16