title: django static files do not work for one application only
body: <p>My django application works well except for one application, all the static files are not loaded.</p>
  
  <p>That happens on this url: <code>http://localhost/db_mgmt/add/dg/</code>. The template is loaded, but no css, no js.
  When I look at one of the errors, the browser tries to load the page <code>http://localhost/db_mgmt/add/static/jquery.min.js</code> but the link should be: <code>http://localhost/static/jquery.min.js</code>
  These files are loaded in base.html and work everywhere else... </p>
  
  <p>Example of inclusion in base.html:</p>
  
  <pre><code>&lt;script type="text/javascript" src="{{ STATIC_URL }}jquery.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Here is my settings.py if it helps:</p>
  
  <pre><code># Django settings for europolix project.
  from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS as TCP
  
  import os
  #root of the project
  PROJECT_ROOT=os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
  #root of templates
  TEMPLATE_ROOT=os.path.join(PROJECT_ROOT, 'templates')
  #root of media files (import / export files)
  MEDIA_ROOT=os.path.join(PROJECT_ROOT, 'media')
  #root of static files (css, js, jquery...)
  STATIC_ROOT=os.path.join(PROJECT_ROOT, 'static')
  #WEB_ROOT=url of WSGIScriptAlias given in the apache configuration file (/etc/apache2/apache2.conf in Lubuntu 13.04)
  #example: WSGIScriptAlias /europolix /var/www/europolix/europolix/wsgi.py -&gt; WEB_ROOT="/europolix"
  #in the apache configuration file, you must update the alias for static files as well
  #ex: Alias /europolix/static /var/www/europolix/static -&gt; WEB_ROOT="/europolix"
  WEB_ROOT="/europolix"
  #local
  WEB_ROOT=".."
  # URL that handles the media served from MEDIA_ROOT. Make sure to use a
  # trailing slash.
  # Examples: "http://media.actrence.com/media/", "http://example.com/media/"
  MEDIA_URL=WEB_ROOT+'/media/'
  
  # URL prefix for static files.
  # Example: "http://media.actrence.com/static/"
  STATIC_URL=WEB_ROOT+'/static/'
  
  # Additional locations of static files
  
  STATICFILES_DIRS=(
      STATIC_ROOT,
      # Put strings here, like "/home/html/static" or "C:/www/django/static".
      # Always use forward slashes, even on Windows.
      # Don't forget to use absolute paths, not relative paths.
  )
  
  TEMPLATE_DIRS=(
      TEMPLATE_ROOT
      # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
      # Always use forward slashes, even on Windows.
      # Don't forget to use absolute paths, not relative paths.
  )
  </code></pre>
  
  <p>If I print those variables in my view I have the following paths:</p>
  
  <pre><code>PROJECT_ROOT /var/www/europolix
  STATIC_ROOT /var/www/europolix/static
  STATIC_URL ../static/
  WEB_ROOT ..
  </code></pre>
  
  <p>Thanks in advance for your help.</p>
  
  <h2>Edit :</h2>
  
  <p>The variable WEB_ROOT is relative in local. Could it be the problem?
  The variable searches in the parent directory (am I right?). So the applications with only one "child" in the url work (<code>http://localhost/act</code> or <code>http://localhost/export</code>) but not the applications with many "children" (e.g.: the one above, <code>http://localhost/db_mgmt/add/dg/</code>)</p>
  
  <p>urls.py of the export app:</p>
  
  <pre><code>urlpatterns=patterns('export.views',
      url(r'^/?$', 'export', name='export'),
  )
  </code></pre>
  
  <p>urls.py of the db_mgmt app that does not work well:</p>
  
  <pre><code>urlpatterns=patterns('db_mgmt.views',
      url(r'^add/(?P&lt;field&gt;\w+)/$', 'add', name='add'),
      url(r'^form_add.html/(?P&lt;field&gt;\w+)/$', 'form_add', name='form_add'),
  )
  </code></pre>