from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin # IMPORTAMOS VIESETS Y ROUTER DE LA LIBRERIA REST from rest_framework import viewsets, routers # IMPORTAMOS LAS VISTAS from Zalamero.views import * admin.autodiscover() # REGISTRAMOS LAS VISTAS PARA EL RUTEO CON LA URL # Routers provide an easy way of automatically determining the URL conf. router = routers.DefaultRouter(trailing_slash=False) #router = routers.DefaultRouter() router.register(r'users', UserViewSet) # router.register(r'groups', GroupViewSet) router.register(r'dependencias', DependenciaViewSet ) router.register(r'proyecto', ProyectoViewSet ) router.register(r'proyectos', ProyectoViewSet ) router.register(r'comentario', ComentarioViewSet ) router.register(r'actividad', ActividadViewSet ) router.register(r'actividadesusuario', ActividadesUsuarioViewSet ) #router.register(r'terminaractividad',TerminarActividadViewSet) router.register(r'estatus', EstatusViewSet ) urlpatterns = patterns('', # Examples: # url(r'^$', 'DGTIC.views.home', name='home'), # url(r'^DGTIC/', include('DGTIC.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: url(r'^caronte/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^caronte/', include(admin.site.urls)), # RUTA DEFAULT url(r'^api/', include(router.urls)), # INCLUIMOS LAS RUTAS REST url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^$index', IndexView.as_view()), url(r'^prueba', prueba), url(r'^chismoso', ChismosoView.as_view()), url(r'^$', login_), url(r'^logout_user/', logout_user), url(r'^validar/', validar), url('^api/comentarioslist/$', ComentarioList.as_view()), # url('^api/actividades/(?P.+)$', ActividadesList.as_view()), #url('^api/editproyecto/(?P.+)$', ProyectoDetalle.as_view()), url('^api/proyectoslist', ProyectoList.as_view()), url('^api/proyectosTerminadosList', ProyectosTerminadosList.as_view()), url('^api/actividades/', ActividadList.as_view()), url('^api/actividadesusuariolist', ActividadesUsuarioList.as_view()), url('^api/Adminactividadesusuariolist', ActividadesUsuarioListAdmin.as_view()), url(r'^home', home), url(r'^api/userlist',UserList.as_view()), url('^api/terminaractividad/(?P.+)$', TerminarActividadViewSet.as_view()), #url(r'^reporte/(?P\d+)$',reporteView.as_view()), url(r'^reporte_director/(?P\d+)$', reporte_directorView.as_view()), url(r'^reporte/(?P\d+)$', reporteView.as_view()), #url(r'^reporte/(?P\d+)$', reporteView), url(r'^perfil/(?P\d+)', perfil), url(r'^perfil/chpasswd/done/?', 'django.contrib.auth.views.password_change_done', {'template_name':'registration/password_change_done.html'}), url(r'^perfil/chpasswd/?', 'django.contrib.auth.views.password_change', {'template_name':'registration/password_change_form.html'}), ) if settings.DEBUG: # static files (images, css, javascript, etc.) urlpatterns += patterns('', (r'^media/(?P.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT}))