-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Can't import local module to pelicanconf.py #2111
Comments
is jinja_custom_filters.py in your pythonpath? |
It work for me import sys
sys.path.append('.')
import jinja_custom_filters
JINJA_FILTERS = {'filter_name_in_html': jinja_custom_filters.the_filter_function} and It work fine for me, maybe need to update the Docs? |
Works for me as well. I have the problem on Windows with vritual env. Is this something to do with pelican running in a different home directory. eg a pelicanconf.py file like this:
|
Closing due to inactivity. Please feel free to comment here if you feel the issue should be re-opened. |
Well, it's still broken, so maybe it should be re-opened on that basis. |
@deutrino: Not a very helpful comment. Most of what I’m seeing here is “works for me.” Moreover, the word “broken” is about the most information-free word imaginable in a software context. |
this workaround works, but feels more like unnecessary step and strange behavior |
I have a file with my custom jinja2 filters. These work fine when pasted directly into
pelicanconf.py
. However, when I attempt to import the module usingI get the following error:
I wrote a quick test file in the same directory as
pelicanconf.py
andjinja_custom_filters.py
, and it has no problem importingjinja_custom_filters
.I've combed the documentation, but I can't find anything that would assist with this.
The text was updated successfully, but these errors were encountered: