title: Managing static files for multiple apps in Django
body: <p>I am developing a Django (1.3) project composed of many applications. Each application has its own static files under its own <code>static</code> directory. Moreover, I have added a directory called <code>project_static</code> which should contain static files which are common throughout the various applications, such as jQuery.</p>
  
  <p>The problem I immediately run into is that of naming collisions. By default, <code>collectstatic</code> will just put everything under a global <code>static</code> directory, without classifying them  by application. This does not work for me, as each application has - for instance - a file called <code>css/screen.css</code>.</p>
  
  <p>The way I solved it is by removing <code>django.contrib.staticfiles.finders.AppDirectoriesFinder</code> from <code>STATICFILES_FINDERS</code> and using <a href="https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#prefixes-optional" rel="noreferrer">namespaced static files dirs</a>, so my settings now look like:</p>
  
  <pre><code>STATICFILES_DIRS = (
      os.path.join(PROJECT_PATH, 'project_static'),
      ('my_app', os.path.join(PROJECT_PATH, 'my_app', 'static')),
      ('another_app', os.path.join(PROJECT_PATH, 'another_app', 'static')),
      ...
  )
  
  STATICFILES_FINDERS = (
      'django.contrib.staticfiles.finders.FileSystemFinder',
  )
  </code></pre>
  
  <p>The problem is that in this way I lose the static files for all other applications (e.g. <code>django.contrib.admin</code>). Of course I could manually add the admin, but I'm not sure how to do this without breaking the admin, which has a different directory structure.</p>
  
  <blockquote>
    <p>Is there a better way to manage the static files with more than one application?</p>
  </blockquote>