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

urlpatterns = [
    url(r'^$', views.index, name='index'),
    url(r'^image/$', views.add_image, name='upload_image'),
    url(r'^profile/$', views.profile_info, name='profile'),
    url(r'^update/$', views.profile_update, name='update'),
    url(r'^comment/(?P<image_id>\d+)', views.comment, name='comment'),
    url(r'^search/', views.search_results, name = 'search_results'),
    url(r'^follow/(?P<user_id>\d+)', views.follow, name = 'follow'),
    url(r'^unfollow/(?P<user_id>\d+)', views.unfollow, name='unfollow'),
    url(r'^likes/(\d+)/$', views.like_images,name='likes')
]
if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

[((7, 4, 7, 41), 'django.conf.urls.url', 'url', (), '', False, 'from django.conf.urls import url\n'), ((8, 4, 8, 58), 'django.conf.urls.url', 'url', (), '', False, 'from django.conf.urls import url\n'), ((9, 4, 9, 58), 'django.conf.urls.url', 'url', (), '', False, 'from django.conf.urls import url\n'), ((10, 4, 10, 58), 'django.conf.urls.url', 'url', (), '', False, 'from django.conf.urls import url\n'), ((11, 4, 11, 69), 'django.conf.urls.url', 'url', (), '', False, 'from django.conf.urls import url\n'), ((12, 4, 12, 67), 'django.conf.urls.url', 'url', (), '', False, 'from django.conf.urls import url\n'), ((13, 4, 13, 67), 'django.conf.urls.url', 'url', (), '', False, 'from django.conf.urls import url\n'), ((14, 4, 14, 71), 'django.conf.urls.url', 'url', (), '', False, 'from django.conf.urls import url\n'), ((15, 4, 15, 58), 'django.conf.urls.url', 'url', (), '', False, 'from django.conf.urls import url\n'), ((18, 19, 18, 80), 'django.conf.urls.static.static', 'static', (), '', False, 'from django.conf.urls.static import static\n')]