コード例 #1
0
from django.conf.urls import include, url

from views import ProjectDetailView, ProjectCreateView, ProjectUpdateView, \
                   ProjectDeleteView, ProjectListView, create_version

urlpatterns = [
    url(r'^create/$', ProjectCreateView.as_view(), name='project-create'),
    url(r'^list/$', ProjectListView.as_view(), name='project-list'),
    url(r'^(?P<slug>[\w-]+)/$',
        ProjectDetailView.as_view(),
        name='project-detail'),
    url(r'^(?P<slug>[\w-]+)/edit/$',
        ProjectUpdateView.as_view(),
        name='project-edit'),
    url(r'^(?P<slug>[\w-]+)/delete/$',
        ProjectDeleteView.as_view(),
        name='project-delete'),
    url(r'^(?P<slug>[\w-]+)/create-version/$',
        create_version,
        name='project-create-version'),
]
コード例 #2
0
ファイル: urls.py プロジェクト: RedPanal/redpanal
from django.conf.urls import include, url

from views import ProjectDetailView, ProjectCreateView, ProjectUpdateView, \
                   ProjectDeleteView, ProjectListView, create_version


urlpatterns = [
    url(r'^create/$', ProjectCreateView.as_view(), name='project-create'),
    url(r'^list/$', ProjectListView.as_view(), name='project-list'),
    url(r'^(?P<slug>[\w-]+)/$', ProjectDetailView.as_view(), name='project-detail'),
    url(r'^(?P<slug>[\w-]+)/edit/$', ProjectUpdateView.as_view(), name='project-edit'),
    url(r'^(?P<slug>[\w-]+)/delete/$', ProjectDeleteView.as_view(), name='project-delete'),
    url(r'^(?P<slug>[\w-]+)/create-version/$', create_version, name='project-create-version'),
]
コード例 #3
0
ファイル: urls.py プロジェクト: yangcan0918/MtOps2
    CabinetListView,
    HardwareCreateView,
    HardwareUpdateView,
    HardwareDeleteView,
    HardwareListView,
    HostCreateView,
    HostUpdateView,
    HostDeleteView,
    HostDetailView,
    HostListView,
)

urlpatterns = [
    url(  # 创建软件项目
        r'project/create/$',
        ProjectCreateView.as_view(),
        name='asset-project-create',
    ),
    url(  # 更新软件项目
        r'project/(?P<project_id>\d+)/update/$',
        ProjectUpdateView.as_view(),
        name='asset-project-update',
    ),
    url(  # 删除软件项目
        r'project/(?P<project_id>\d+)/delete/$',
        ProjectDeleteView.as_view(),
        name='asset-project-delete',
    ),
    #    url( # 项目详情
    #        r'project/(?P<project_id>\d+)/detail/', ProjectDetailView.as_view(),
    #        name='asset-project-detail',
コード例 #4
0
ファイル: urls.py プロジェクト: dodobas/visual_changelog
        view=PendingProjectListView.as_view(),
        name='pending-project-list'),
    url(regex='^approve-project/(?P<pk>\d+)/$',
        view=ApproveProjectView.as_view(),
        name='project-approve'),
    url(regex='^project/list/$',
        view=ProjectListView.as_view(),
        name='project-list'),
    url(regex='^project/(?P<pk>\d+)/$',
        view=ProjectDetailView.as_view(),
        name='project-detail'),
    url(regex='^project/delete/(?P<pk>\d+)/$',
        view=ProjectDeleteView.as_view(),
        name='project-delete'),
    url(regex='^project/create/$',
        view=ProjectCreateView.as_view(),
        name='project-create'),
    url(regex='^project/update/(?P<pk>\d+)/$',
        view=ProjectUpdateView.as_view(),
        name='project-update'),

    # Category management

    # This view is only accessible via ajax
    url(regex='^json-category/list/(?P<version>\d+)/$',
        view=JSONCategoryListView.as_view(),
        name='json-category-list'),
    url(regex='^pending-category/list/$',
        view=PendingCategoryListView.as_view(),
        name='pending-category-list'),
    url(regex='^approve-category/(?P<pk>\d+)/$',
コード例 #5
0
ファイル: urls.py プロジェクト: gitter-badger/projecta
    ProjectDeleteView,
    ProjectCreateView,
    ProjectListView,
    ProjectUpdateView,
    PendingProjectListView,
    ApproveProjectView,
    ProjectBallotListView,
)

urlpatterns = patterns(
    "",
    # basic app views
    url(regex="^$", view=ProjectListView.as_view(), name="home"),
    # Project management
    url(regex="^pending-project/list/$", view=PendingProjectListView.as_view(), name="pending-project-list"),
    url(regex="^approve-project/(?P<slug>[\w-]+)/$", view=ApproveProjectView.as_view(), name="project-approve"),
    url(regex="^project/list/$", view=ProjectListView.as_view(), name="project-list"),
    url(regex="^(?P<slug>[\w-]+)/$", view=ProjectDetailView.as_view(), name="project-detail"),
    url(regex="^(?P<slug>[\w-]+)/ballots/$", view=ProjectBallotListView.as_view(), name="project-ballot-list"),
    url(regex="^project/(?P<slug>[\w-]+)/delete/$", view=ProjectDeleteView.as_view(), name="project-delete"),
    url(regex="^project/create/$", view=ProjectCreateView.as_view(), name="project-create"),
    url(regex="^project/(?P<slug>[\w-]+)/update/$", view=ProjectUpdateView.as_view(), name="project-update"),
)


if settings.DEBUG:
    # static files (images, css, javascript, etc.)
    urlpatterns += patterns(
        "", (r"^media/(?P<path>.*)$", "django.views.static.serve", {"document_root": settings.MEDIA_ROOT})
    )