Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Turns out there was a subtle problem with my <code>settings.py</code> splitting method. For anyone coming here from Google, I was following <a href="http://www.deploydjango.com/django_project_structure/index.html#building-a-perfect-django-settings-module" rel="nofollow">deploydjango.com</a>'s and strategy on splitting <code>settings.py</code>, however <code>ROOT_DIR</code> was being defined in terms of the project, i.e. the following structure</p> <pre><code>$ tree -L 2 . ├── static ├── apps └── project ├── __init__.py ├── settings │   ├── __init__.py │   ├── base.py │   ├── dev.py │   └── prod.py ├── urls.py └── wsgi.py </code></pre> <p>with the following setting</p> <pre><code>STATICFILES_DIRS = ( ABS_PATH('apps', 'example_app', 'static'), ) </code></pre> <p>would result in <code>ROOT_DIR</code> being set to <code>project/</code>. And since <code>ABS_PATH</code> function defines paths based on <code>ROOT_DIR</code>, the <code>apps/</code> folder is not visible (it should be preceded with <code>'..'</code>).</p> <p>The solution is of course to move <code>apps/</code> folder inside the <code>project/</code> folder, which makes sense. I.e. the correct structure is as follows:</p> <pre><code>$ tree -L 2 . ├── static └── project_name ├── __init__.py ├── apps # &lt;-- apps moved here │   └── example_app ├── settings │   ├── __init__.py │   ├── base.py │   ├── dev.py │   └── prod.py ├── urls.py └── wsgi.py </code></pre> <p>I realised this problem is very tied to the way I was doing things, however since this structure can be seen by some people as "best practice" (although <a href="http://bruno.im/2013/may/18/django-stop-writing-settings-files/" rel="nofollow">some disagree</a>), I hope this helps someone!</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. 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