Ejemplo n.º 1
0
"""collage URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.conf.urls import url

from client.views import ClientList
from project.views import ProjectList

urlpatterns = [
    path('admin/', admin.site.urls),
    url(r'^clients/$', ClientList.as_view()),
    url(r'^projects/$', ProjectList.as_view()),
]
# create project urls here
from django.conf.urls import patterns, url
from project.views import ProjectList, ProjectDetail, CategoryProjectList

urlpatterns = patterns('',
    # ex: /project | /projects
    url(r'^$', ProjectList.as_view( template_name="project/projects.html", paginate_by=10 ), name='project_list',),
    # ex: /project/3/
    url(r'^(?P<pk>\d+)/$', ProjectDetail.as_view( template_name="project/detail.html" ), name='project_detail'),
    # ex: /project/transportation | /projects/civil-engineering
    url(r'^category/(?P<category>[-\w]+)/$', CategoryProjectList.as_view(), name='projects_by_category',),
)
Ejemplo n.º 3
0
from django.conf.urls import patterns, url

from project.views import ProjectList, ProjectNew

urlpatterns = patterns(
    '',
    url(r'^$', ProjectList.as_view(), name='list'),
    url(r'^project/new/$', ProjectNew.as_view(), name='new'),
)
Ejemplo n.º 4
0
from django.urls import path, re_path

import account
from account.views import ObtainJWTFromSocialProvider, UserList, UserDetail, UserRegister, UserLogin, UserGetMe, \
    UserChangePassword
from project.views import ProjectList, ProjectDetail, DeviceList, DeviceDetail, SensorList, SensorDetail, DataView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('social-auth/', include('social_django.urls', namespace='social')),
    re_path(r'^api/token/?',
            ObtainJWTFromSocialProvider.as_view(),
            name='rest_social_auth'),
    re_path(r'^api/user/?', include('account.urls')),
    re_path(r'^api/register/?', UserRegister.as_view()),
    re_path(r'^api/login/?', UserLogin.as_view()),
    re_path(r'^api/changepassword/?', UserChangePassword.as_view()),
    re_path(r'^api/get-me/?', UserGetMe.as_view()),
    re_path(r'^api/projects/?', ProjectList.as_view()),
    re_path(r'^api/project/(?P<pk>\w{8}-\w{4}-\w{4}-\w{4}-\w{12})/?$',
            ProjectDetail.as_view()),
    re_path(r'^api/devices/?', DeviceList.as_view()),
    re_path(r'^api/device/(?P<pk>\w{8}-\w{4}-\w{4}-\w{4}-\w{12})/?$',
            DeviceDetail.as_view()),
    re_path(r'^api/sensors/?', SensorList.as_view()),
    re_path(r'^api/sensor/(?P<pk>\w{8}-\w{4}-\w{4}-\w{4}-\w{12})/?$',
            SensorDetail.as_view()),
    re_path(r'^api/data/?$', DataView.as_view()),
    # url(r'^api/', include(router.urls)),
]
Ejemplo n.º 5
0
from django.urls import path
from project.views import ProjectView, ProjectCreate, UserUpdate, ProjectList, ProjectDelete, ProjectMemberList
from django.http import HttpResponse

urlpatterns = [
    path('', ProjectView.as_view(), name='project'),
    path('new/', ProjectCreate.as_view(), name='project_new'),
    path('delete/<name>/', ProjectDelete.as_view(), name='project_delete'),
    path('update/<username>/', UserUpdate.as_view(), name='user_update'),
    path('list/', ProjectList.as_view(), name='users_projects'),
    path('members/', ProjectMemberList.as_view(), name='project_members')
]
Ejemplo n.º 6
0
    def _callFUT(self, *args, **kwargs):
        from project.views import ProjectList

        return ProjectList.as_view()(*args, **kwargs)
Ejemplo n.º 7
0
from django.urls import path

from project.views import ProjectGanttList, ProjectList
from project import views

app_name = 'project'

urlpatterns = [
    path('home/', views.index, name='projects'),
    path('', ProjectList.as_view(), name='list'),
    path('project/<str:project>',
         ProjectGanttList.as_view(),
         name='project-gantt-list'),
    path('<int:project_id>', views.project, name='project-list'),
    path('search', views.search, name='search'),
]