Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>When you use "pip" to install something, the package's <code>setup.py</code> is used to determine what packages to install. And this project's <code>setup.py</code>, if I'm reading it correctly, says "just install these Python packages inside the <code>basic</code> directory" — the <code>setup.py</code> makes absolutely no mention of any non-Python files it wants included in the install.</p> <p>This might be deliberate on the developer's part, since it is something of a tradition for Django packages to not include templates — notoriously, even something so basic as the built-in <code>django.contrib.auth</code> comes without any templates and makes you build its little forms from the ground up each time! (Or, to cut and paste from examples elsewhere on the web.)</p> <p>But if you yourself want the templates to be installed with this Python distribution, regardless of how the author has set things up, then just list the templates in the <code>setup.py</code>! First, add something like this to the <code>setup.py</code> file:</p> <pre><code>template_patterns = [ 'templates/*.html', 'templates/*/*.html', 'templates/*/*/*.html', ] </code></pre> <p>Then, add one last variable to the <code>setup()</code> call so that it ends like this:</p> <pre><code>... packages=packages, package_data=dict( (package_name, template_patterns) for package_name in packages )) </code></pre> <p>This asserts to the <code>setup()</code> function that every package should be accompanied by data files that are found by searching for HTML files beneath each package's <code>templates</code> directory.</p> <p>Try it out, and let me know if this works on your machine too!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload