<filename>mygallery/urls.py<gh_stars>0
from django.conf.urls import url
from . import views
from django.conf import settings
from django.conf.urls.static import static

urlpatterns=[
    url('^$',views.index,name = 'index'),
    url(r'^search/', views.search_results, name='search_results'),
    url(r'^location/(?P<location>\w+)/', views.location, name='location'),
    url(r'^category/(?P<category>\w+)/', views.category, name='category'),
]

if settings.DEBUG:
    urlpatterns+= static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT)
    
<filename>mygallery/urls.py<gh_stars>0
from django.conf.urls import url
from . import views
from django.conf import settings
from django.conf.urls.static import static

urlpatterns=[
    url('^$',views.index,name = 'index'),
    url(r'^search/', views.search_results, name='search_results'),
    url(r'^location/(?P<location>\w+)/', views.location, name='location'),
    url(r'^category/(?P<category>\w+)/', views.category, name='category'),
]

if settings.DEBUG:
    urlpatterns+= static(settings.MEDIA_URL, document_root = settings.MEDIA_ROOT)
    