"""smarttools URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls import url
from django.contrib.auth.views import login, logout
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf.urls.static import static

urlpatterns = [
    url(r'^$', 'videosapp.views.index', name='index'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^registrarse/$', 'videosapp.views.post_registrarse', name='post_registrarse'),
    url(r'^addconcurso/$', 'videosapp.views.post_concurso', name='post_concurso'),
    url(r'^detalleconcurso/(?P<i>[0-9]+)/$', 'videosapp.views.detalle_concurso'),
    url(r'^editarconcurso/(?P<i>[0-9]+)/$', 'videosapp.views.editar_concurso'),
    url(r'^borrarconcurso/(?P<i>[0-9]+)/$', 'videosapp.views.borrar_concurso'),
    url(r'^perfil/$', 'videosapp.views.perfil', name='perfil'),
    url(r'^accounts/login/$',  login),
    url(r'^accounts/logout/$', logout),
    url(r'^accounts/profile/$', 'videosapp.views.perfil', name='perfil'),
    url(r'^concurso/(?P<urlConcurso>\w+)/$', 'videosapp.views.concurso', name='ver_concurso'),
	url(r'^concurso/(?P<urlConcurso>\w+)/subir_video$', 'videosapp.views.subir_video', name='subir_video'),
]

urlpatterns += staticfiles_urlpatterns()
