-
Notifications
You must be signed in to change notification settings - Fork 457
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
Template rendering failure when installing theme plugin #975
Comments
Hi @ravikhetani! It should be easy enough to add the ".otf" extension to the Would you like to open a PR? Ideally, we should implement both solutions, but feel free to tackle just one. If you'd rather not open a PR, we can take care of it. |
@regisb I think yes to both - I'll submit a PR for the quick fix of adding it to the lest of extensions, but I think the filter is the proper solution, as I can imagine other supported image formats etc that people may want to add. |
@regisb I will work on making the file copying filter |
@Abdul-Muqadim-Arbisoft Please add the details of the new PR and update the issue accordingly. Thank you |
This pull request introduces a new filter, IS_FILE_RENDERED, designed to enhance the flexibility of file handling within Tutor plugins. The new IS_FILE_RENDERED filter allows plugin developers to specify files that should not be rendered but instead copied . For our specific scenario we can add path to the respective .otf files through the filter we can return false for rendering it and it would only be copied |
Bug description
Hi, I was trying to build the Openedx image with a theme plugin, and an exception was thrown in
/tutor/tutor/env.py
in thedef render_template
method, for fonts in my themeslms/static/fonts
directory. My fonts are in the OpenType format (.otf). I can't see anything documented in the openedx documents, or tutor documents that suggests that OpenType fonts can't be used.Having looked at env.py
tutor/tutor/env.py
Line 18 in fdd230f
render_template
from trying to render the fonts. Any reason why it's not included in the list of extensions?How to reproduce
Add Opentype fonts to custom theme plugin, and try to build the openedx image
The text was updated successfully, but these errors were encountered: