1#urls.py
2from django.conf import settings
3from django.conf.urls.static import static
4
5urlpatterns=[
6# define all urls
7 ]
8urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
9
10#other method
11urlpatterns = patterns('',
12 # ... the rest of your URLconf goes here ...
13) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
14
1{% load static %}
2<img src="{% static 'my_app/example.jpg' %}" alt="My image">
3