I want to run my django project under gunicorn on localhost. I installed and integrated gunicorn. When I run:
python manage.py run_gunicorn
Since Django 1.3 there is django/conf/urls/static.py that handle static files in the DEBUG mode:
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
# ... the rest of your URLconf goes here ...
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Read more https://docs.djangoproject.com/en/2.0/howto/static-files/#serving-static-files-during-development