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
where to put the templatetags directory #34
Comments
I have a custom template tag here in the example project: example_standalone/templatetags/custom_tags.py. Does that work when you start up the sample project? |
Yes, I just tried running the standalone examle project and the custom tags works. |
Nope, the name
Ah! Ok, index.md
{% load your_tag_here %}
- this is markdown {% current_data %} # some_installed_app.templatetags.your_tag_here.py
def current_data():
# pretend this is a template tag
pass Would it be helpful if I create an |
Ok thanks. It could be useful to have an |
Lines 93 to 113 in d1488ed
Let me know if it would be useful to add a feature around this, though! Or if there is a way to format the docs to make it more clear what to do in the different "modes" since I don't think it's very intuitive right now. I'm going to close this, but feel free to re-open if you run into any issues. |
For the documentation, I don't have a specific idea in mind at the moment, I think the current layout is already very good. |
@all-contributors please add @Tobi-De for tests and code |
I've put up a pull request to add @Tobi-De! 🎉 |
Hi @adamghill, hope you are doing great.
I'm trying to register custom template tags and I have no idea where to put the
templatetags
directory, I tried to put in the directory configure as myBASE_DIR
but I'm getting this:django.template.exceptions.TemplateSyntaxError: Invalid filter: 'test'
I tried with the
test
filter from the docs.The text was updated successfully, but these errors were encountered: