Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This makes sense now.</p> <p>The problem is this as is written in your stacktrace:</p> <pre><code>ImproperlyConfigured: The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting </code></pre> <p>And per your initial configuration:</p> <pre><code>STATIC_ROOT = '/home/hussain/django/ratingsite/ratingsite/static' STATICFILES_DIRS = ( '/home/hussain/django/ratingsite/ratingsite/static',) </code></pre> <p>You will not that both of these point to <strong>exactly the same directory</strong>. This is not allowed for the reason described below.</p> <p>The <code>ImproperlyConfigured</code> error was fixed when you changed the location of one of these configurations (so they were no longer identical).</p> <p>The solution here is to:</p> <ul> <li><p>create a different <code>STATIC_ROOT</code> directory (we'd call this something like <code>/public/static/</code>) <em>do not put any files in this directory</em> this is where all of the static files are automatically collected to when your site is ready to publish.</p></li> <li><p>put the location/s of the files that you are developing in the <code>STATICFILES_DIRS</code>.</p></li> </ul> <p>When you are ready to publish your project you are able to run <code>$ ./manage.py collectstatic</code> which will go through all the apps and staticfiles directories your project uses and compile a set of all the "final" static files you need in the <code>STATIC_ROOT</code> directory ready for publication with your finished site.</p> <p>If your <code>STATIC_ROOT</code> directory was included in the directories that was gone through by <code>collectstatic</code> there would obviously be a recursive loop.</p>
 

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