Need help with django-staticfiles?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

128 Stars 35 Forks BSD 3-Clause "New" or "Revised" License 279 Commits 10 Opened issues


[Unmaintained] A Django app that provides helpers for serving static files, used in Django and Pinax.

Services available


Need anything else?

Contributors list



This is a Django app that provides helpers for serving static files.

Django developers mostly concern themselves with the dynamic parts of web applications -- the views and templates that render new for each request. But web applications have other parts: the static media files (images, CSS, Javascript, etc.) that are needed to render a complete web page.

For small projects, this isn't a big deal, because you can just keep the media somewhere your web server can find it. However, in bigger projects -- especially those comprised of multiple apps -- dealing with the multiple sets of static files provided by each application starts to get tricky.

That's what

is for:
Collecting static files from each of your Django apps (and any other
place you specify) into a single location that can easily be served in

The main website for django-staticfiles is
_ where you can also file tickets.

.. note:: django-staticfiles is now part of Django (since 1.3) as


The django-staticfiles 0.3.X series will only receive security and data loss bug fixes after the release of django-staticfiles 1.0. Any Django 1.2.X project using django-staticfiles 0.3.X and lower should be upgraded to use either Django >= 1.3's staticfiles app or django-staticfiles >= 1.0 to profit from the new features and stability.

You may want to chose to use django-staticfiles instead of Django's own staticfiles app since any new feature (additionally to those backported from Django) will be released first in django-staticfiles.


  • Use your favorite Python packaging tool to install

    _, e.g.::

    pip install django-staticfiles

You can also install the

in-development version
_ of django-staticfiles with
pip install django-staticfiles==dev
  • Added

    to your

    INSTALLED_APPS = [ # ... "staticfiles", ]

  • Set your

    setting to the URL that handles serving static files::

    STATIC_URL = "/static/"

  • In development mode (when

    DEBUG = True
    ) the
    command will automatically serve static files::

    python runserver

  • Once you are ready to deploy all static files of your site in a central directory (

    ) to be served by a real webserver (e.g. Apache, Cherokee, Lighttpd, Nginx etc.), use the
    management command::

    python collectstatic

See the webserver's documentation for descriptions how to setup serving the deployment directory (

  • (optional) In case you use Django's admin app, make sure the

    setting is set correctly to a subpath of


.. .. _in-development version: .. _PyPI: .. _Apache: .. _Lighttpd: .. _Nginx: .. _Cherokee:

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.