Closed
Description
Issue Summary
When defining template context files (the YAML) files, these are only recognised when they use the full .yaml
extension.
When using the shorter .yml
extension the template is not picking up the context file.
This can be very confusing.
Steps to Reproduce
- Setup a project with
django-patter-library
enable - Create a template
test.html
in one of the directories observed bydjango-pattern-library
with the content
{{ test_var }}
- Create a context file
test.yaml
next to the template with the content
context:
test_var: Test content
- Open the template in the patter library and observe that you see "Test content"
- Rename the context file
mv test.yaml test.yml
- Open the template in the patter library and observe that you see nothing. The context is not rendered anymore.