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)

[((151, 187), 'django.conf.urls.url', 'url', (['"""^$"""', 'views.index'], {'name': '"""index"""'}), "('^$', views.index, name='index')\n", (154, 187), False, 'from django.conf.urls import url\n'), ((194, 247), 'django.conf.urls.url', 'url', (['"""^image/$"""', 'views.add_image'], {'name': '"""upload_image"""'}), "('^image/$', views.add_image, name='upload_image')\n", (197, 247), False, 'from django.conf.urls import url\n'), ((254, 307), 'django.conf.urls.url', 'url', (['"""^profile/$"""', 'views.profile_info'], {'name': '"""profile"""'}), "('^profile/$', views.profile_info, name='profile')\n", (257, 307), False, 'from django.conf.urls import url\n'), ((314, 367), 'django.conf.urls.url', 'url', (['"""^update/$"""', 'views.profile_update'], {'name': '"""update"""'}), "('^update/$', views.profile_update, name='update')\n", (317, 367), False, 'from django.conf.urls import url\n'), ((374, 439), 'django.conf.urls.url', 'url', (['"""^comment/(?P<image_id>\\\\d+)"""', 'views.comment'], {'name': '"""comment"""'}), "('^comment/(?P<image_id>\\\\d+)', views.comment, name='comment')\n", (377, 439), False, 'from django.conf.urls import url\n'), ((445, 505), 'django.conf.urls.url', 'url', (['"""^search/"""', 'views.search_results'], {'name': '"""search_results"""'}), "('^search/', views.search_results, name='search_results')\n", (448, 505), False, 'from django.conf.urls import url\n'), ((514, 575), 'django.conf.urls.url', 'url', (['"""^follow/(?P<user_id>\\\\d+)"""', 'views.follow'], {'name': '"""follow"""'}), "('^follow/(?P<user_id>\\\\d+)', views.follow, name='follow')\n", (517, 575), False, 'from django.conf.urls import url\n'), ((583, 650), 'django.conf.urls.url', 'url', (['"""^unfollow/(?P<user_id>\\\\d+)"""', 'views.unfollow'], {'name': '"""unfollow"""'}), "('^unfollow/(?P<user_id>\\\\d+)', views.unfollow, name='unfollow')\n", (586, 650), False, 'from django.conf.urls import url\n'), ((656, 711), 'django.conf.urls.url', 'url', (['"""^likes/(\\\\d+)/$"""', 'views.like_images'], {'name': '"""likes"""'}), "('^likes/(\\\\d+)/$', views.like_images, name='likes')\n", (659, 711), False, 'from django.conf.urls import url\n'), ((751, 812), 'django.conf.urls.static.static', 'static', (['settings.MEDIA_URL'], {'document_root': 'settings.MEDIA_ROOT'}), '(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)\n', (757, 812), False, 'from django.conf.urls.static import static\n')]