django static files

from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
    # ... the rest of your URLconf goes here ...
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

Here is what the above code is Doing:
1. We are appending static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) to our urlpatterns list.
2. This will tell Django to match the root URL (^$) with views.home, and any other URL with the string ‘static’ in it with django.views.static.serve, passing in the document_root parameter set to STATIC_ROOT.
3. We are also appending static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) to our urlpatterns list.
4. This will tell Django to match any URL with the string ‘media’ in it with django.views.static.serve, passing in the document_root parameter set to MEDIA_ROOT.