Exemplo n.º 1
0
        name='delete_activity_view'),
    url(r'^customer/(?P<pk>[0-9]+)/$',
        login_required(CustomerView.as_view()),
        name='customer_view'),
    url(r'^customer/$',
        permission_required('is_staff')(CustomerListView.as_view()),
        name='customer_list'),
    url(r'^customer/create/$',
        permission_required('is_staff')(CreateCustomerView.as_view()),
        name='create_customer_view'),
    url(r'^customer/update/(?P<pk>[0-9]+)/$',
        permission_required('is_staff')(UpdateCustomerView.as_view()),
        name='update_customer_view'),
    url(r'^customer/delete/(?P<pk>[0-9]+)/$',
        permission_required('is_staff')(DeleteCustomerView.as_view()),
        name='delete_customer_view'),
    url(r'^(?P<pk>[0-9]+)/$',
        login_required(ProjectView.as_view()),
        name='project_view'),
    url(r'^$', login_required(ProjectListView.as_view()), name='project_list'),
    url(r'^create/$',
        permission_required('is_staff')(CreateProjectView.as_view()),
        name='create_project_view'),
    url(r'^update/(?P<pk>[0-9]+)/$',
        permission_required('is_staff')(UpdateProjectView.as_view()),
        name='update_project_view'),
    url(r'^delete/(?P<pk>[0-9]+)/$',
        permission_required('is_staff')(DeleteProjectView.as_view()),
        name='delete_project_view'),
]
Exemplo n.º 2
0
"""project urls."""
from django.urls import path, re_path

from project.views import ProjectListView, ProjectDetailView

app_name = 'project'

urlpatterns = [
    path('', ProjectListView.as_view(), name='index'),
    re_path(r'(?P<uid>\w+)/', ProjectDetailView.as_view(), name='detail'),
]
Exemplo n.º 3
0
from django.urls import path

from project.views import ProjectListView, ProjectDetailView
from project.views import ReleaseListView, ReleaseDetailView
from project.views import SprintListView, SprintDetailView
from project.views import SprintProjectListView
from tasks.views import TaskListView, TaskDetailView
from tasks.views import TaskListFilterView, TaskDetailFilterView

urlpatterns = [
    path('', ProjectListView.as_view()),
    path('<int:pk>/', ProjectDetailView.as_view()),
    path('<int:project_pk>/releases/', ReleaseListView.as_view()),
    path('<int:project_pk>/releases/<int:pk>/', ReleaseDetailView.as_view()),
    path('<int:project_pk>/releases/<int:release_pk>/sprints/',
         SprintListView.as_view()),
    path('<int:project_pk>/releases/<int:release_pk>/sprints/<int:pk>/',
         SprintDetailView.as_view()),
    path('<int:project_pk>/sprints/', SprintProjectListView.as_view()),
    path('<int:project_pk>/releases/<int:release_pk>/sprints/<int:pk>/tasks/',
         TaskListView.as_view()),
    path(
        '<int:project_pk>/releases/<int:release_pk>/sprints/<int:sprint_pk>/tasks/<int:pk>/',  # noqa E501
        TaskDetailView.as_view()),
    path(
        # '<int:pk>/tasks/?release_id=<release_id>&sprint_id=<sprint_id>/',
        '<int:pk>/tasks/',
        TaskListFilterView.as_view()),
    path('<int:project_pk>/tasks/<int:pk>/', TaskDetailFilterView.as_view()),
]
Exemplo n.º 4
0
    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, include
from django.views.generic import TemplateView
from project.views import ProjectListView
import xadmin

from users.views import *

urlpatterns = [
    # url('admin/', admin.site.urls),
    url('xadmin/', xadmin.site.urls),
    url('^$', ProjectListView.as_view(), name="index"),
    url(r'^user/', include('users.urls')),

    #项目相关url配置
    url(r'^project/', include('project.urls', namespace="project")),

    #团队相关url配置
    url(r'^group/', include('group.urls', namespace="group")),

    # #绩效相关url配置
    url(r'^performance/', include('performance.urls',
                                  namespace="performance")),
]
Exemplo n.º 5
0
# FollowDoc is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with FollowDoc.  If not, see <http://www.gnu.org/licenses/>
###############################################################################

from django.conf.urls import patterns, url
from project.views import (
    ProjectListView,
    ProjectCreateView,
    ProjectDetailView,
    LogCreateView,
    LogDetailView,
    DocumentCreateView,
    DocumentDetailView,
)

urlpatterns = patterns(
    "",
    url(r"^$", ProjectListView.as_view(), name="project_list"),
    url(r"^_create/", ProjectCreateView.as_view(), name="project_create"),
    url(r"^(?P<pk>\d+)/$", ProjectDetailView.as_view(), name="project_detail"),
    url(r"^(?P<pkproj>\d+)/log/_create$", LogCreateView.as_view(), name="log_create"),
    url(r"^(?P<pkproj>\d+)/log/(?P<pk>\d+)/$", LogDetailView.as_view(), name="log_detail"),
    url(r"^(?P<pkproj>\d+)/log/(?P<pklog>\d+)/doc/_create/$", DocumentCreateView.as_view(), name="doc_create"),
    url(r"^(?P<pkproj>\d+)/log/(?P<pklog>\d+)/doc/(?P<pk>\d+)/$", DocumentDetailView.as_view(), name="doc_detail"),
)
Exemplo n.º 6
0
from django.conf.urls import patterns, url
from project.views import (
    ProjectListView, ProjectAddView, ProjectDetailView, ProjectBuildView)


urlpatterns = patterns(
    '',
    url(r'^$', ProjectListView.as_view(), name="project.list"),
    url(r'^add/$', ProjectAddView.as_view(), name="project.add"),
    url(r'^(?P<slug>[\w-]+)/$', ProjectDetailView.as_view(),
        name="project.detail"),
    url(r'^(?P<slug>[\w-]+)/build$', ProjectBuildView.as_view(),
        name="project.build"),
)
from django.views.generic.base import TemplateView
from django.contrib.auth.decorators import login_required
from django.views.generic.simple import direct_to_template

admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$', TemplateView.as_view(template_name='home.html'), name='home'),
    url(r'^admin/', include(admin.site.urls)),
    # authentication
    url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login'),
    url(r'^openid/login/$', 'django_openid_auth.views.login_begin', name='openid-login'),
    url(r'^login-complete/$', 'django_openid_auth.views.login_complete', name='openid-complete'),
    url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/',}, name='logout'),
    url(r'^deactivate/$', login_required(DeactivateUserView.as_view()), name='deactivate_user'),
    url(r'^project/$', login_required(ProjectListView.as_view()), name='project_list'),
    url(r'^project/new/$', login_required(NewProjectView.as_view()), name='project_new'),
    url(r'^project/(?P<pk>\d+)/$', login_required(ProjectDetailView.as_view()),name='project_detail'),
    url(r'^project/(?P<pk>\d+)/delete/$', login_required(ProjectDeleteView.as_view()), name='project_delete'),
    url(r'^project/(?P<pk>\d+)/rename/$', login_required(ProjectChangeTitleView.as_view()),name='project_change_title'),
    url(r'^project/(?P<pk>\d+)/csv/$', login_required(ProjectDetailCSVView.as_view()),name='project_csv'),
    url(r'^project/(?P<project>\d+)/pdf/$', login_required(ProjectAnswerViewPDF.as_view()),name='project_pdf'),
    url(r'^project/(?P<project>\d+)/answers/$', login_required(ProjectAnswerView.as_view()),name='project_answers'),
    url(r'^project/(?P<project>\d+)/answers/(?P<category>\d+)/$', login_required(ProjectAnswerView.as_view()),name='project_answers'),
    url(r'^project/(?P<project>\d+)/hardware-software/$', login_required(ComponentView.as_view()), name='hardware-software'),
    url(r'^project/(?P<project>\d+)/(?P<category>\d+)/$', login_required(QuestionView.as_view()), name='answer_question'),
    url(r'^features/$',direct_to_template, {'template': 'features.html'},name='features'),
    url(r'^create/$',direct_to_template, {'template': 'create.html'},name='create'),
    url(r'^support/$',direct_to_template, {'template': 'support.html'},name='support'),
    url(r'^resources/$',direct_to_template, {'template': 'resources.html'},name='resources'),
)
Exemplo n.º 8
0
from django.urls import path

from project.views import ProjectDetailView, ProjectListView

urlpatterns = [
    path('', ProjectListView.as_view(), name="projects-list"),
    path(
        '<slug:slug>/',
        ProjectDetailView.as_view(),
        name="projects-detail"
    ),
]
Exemplo n.º 9
0
from django.contrib import admin
from django.urls import path
from project.views import ProjectListView, ProjectAddView, ProjectDataView, ProjectDeleteView, FavoritesActiveview, PublicListView, FavoritesListView, ProjectDetailView, saveVersionView, PdsversionDataView, viewPdsView, FavoritesDataView

app_name = 'project'
urlpatterns = [
    path('list', ProjectListView.as_view(), name='list'),  # 项目列表
    path('add', ProjectAddView.as_view(), name='add'),  # 新建项目
    path('data', ProjectDataView.as_view(), name='data'),  # 数据接口
    path('delete', ProjectDeleteView.as_view(), name='delete'),  # 删除项目 
    path('favoritesdata', FavoritesDataView.as_view(),
         name='favoritesdata'),  # 收藏数据接口
    path('favoritesactive',
         FavoritesActiveview.as_view(),
         name='favoritesactive'),  # 收藏激活 
    path('publiclist', PublicListView.as_view(), name='publiclist'),  # 公共项目
    path('favoriteslist', FavoritesListView.as_view(),
         name='favoriteslist'),  # 收藏项目
    path('projectdetail/<project_id>',
         ProjectDetailView.as_view(),
         name='projectdetail'),  # 项目细节
    path('saveversion', saveVersionView.as_view(), name='saveversion'),  # 保存版本
    path('pdsversiondata/<project_id>',
         PdsversionDataView.as_view(),
         name='pdsversiondata'),  # 版本数据
    path('viewpds/<project_id>/<pdsversion_id>',
         viewPdsView.as_view(),
         name='viewpds'),  # 参看开工纸
]
Exemplo n.º 10
0
from django.conf.urls import url
from project.views import IndexView, ProjectInfoView, ProjectListView, StartProjectView, Step1View, Step2View, Step3View, Step4View

urlpatterns = [
    url(r'^index/$', IndexView.as_view(), name='index'),
    url(r'^info/(?P<project_id>\d+)/$',
        ProjectInfoView.as_view(),
        name='project_info'),
    url(r'^list/$', ProjectListView.as_view(), name='project_list'),
    url(r'^start/$', StartProjectView.as_view(), name='start_project'),
    url(r'^step1/$', Step1View.as_view(), name='step1'),
    url(r'^step2/$', Step2View.as_view(), name='step2'),
    url(r'^step3/$', Step3View.as_view(), name='step3'),
    url(r'^step4/$', Step4View.as_view(), name='step4'),
]
Exemplo n.º 11
0
from django.conf.urls import url
from project.views import ProjectListView, ProjectDetailView

urlpatterns = [
    url(r'^$', ProjectListView.as_view(), name='projectlist'),
    url(r'^(?P<pk>\d+)/$', ProjectDetailView.as_view(), name='projectdetail'),
]