InterviewSolution
| 1. |
How Can I Organize My Templates Hierarchically? |
|
Answer» templates are looked up by the template engines via the NORMAL Python MODULE package mechanisms and the templates DIRECTORY is therefore a Python package. Subdirectories have to be sub-packages as well and you can ACHIEVE that by placing an __init__.py file in them. The__init__.py can contain Python code, but an EMPTY file will do just as well. templates are looked up by the template engines via the normal Python module package mechanisms and the templates directory is therefore a Python package. Subdirectories have to be sub-packages as well and you can achieve that by placing an __init__.py file in them. The__init__.py can contain Python code, but an empty file will do just as well. |
|