from django.urls import path
from django.conf.urls.static import static
from django.conf import settings
from webapp.views import PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView, UserListView, \
    UserDetailView, UserUpdateView

app_name = 'webapp'

urlpatterns = [
    path('', PostListView.as_view(), name='post_list'),
    path('post/<int:pk>', PostDetailView.as_view(), name='post_detail'),
    path('post/create', PostCreateView.as_view(), name='add_post'),
    path('post/update/<int:pk>', PostUpdateView.as_view(), name='post_update'),
    path('post/delete/<int:pk>', PostDeleteView.as_view(), name='post_delete'),
    path('users', UserListView.as_view(), name='user_list'),
    path('user/<int:pk>', UserDetailView.as_view(), name='user_detail'),
    path('user/update/<int:pk>', UserUpdateView.as_view(), name='user_update')
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.urls import path
from webapp.views import IndexListView, PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView, UserInfoListView, UserInfoDetailView, UserUpdateView

app_name = 'webapp'

urlpatterns = [
    path('', IndexListView.as_view(), name="index"),
    path('post', PostListView.as_view(), name="post_list"),
    path('post/<int:pk>', PostDetailView.as_view(), name="post_detail"),
    path('post/create', PostCreateView.as_view(), name="post_create"),
    path('post/<int:pk>/update', PostUpdateView.as_view(), name="post_update"),
    path('post/<int:pk>/delete', PostDeleteView.as_view(), name="post_delete"),
    path('userinfo', UserInfoListView.as_view(), name="userinfo_list"),
    path('userinfo/<int:pk>',
         UserInfoDetailView.as_view(),
         name="userinfo_detail"),
    path('userinfo/<int:pk>/update',
         UserUpdateView.as_view(),
         name="user_update"),
]
Exemplo n.º 3
0
from django.urls import path
from webapp.views import (IndexView, TracerView, TracerDeleteView,
                          TracerUpdateView, ProjectTracerCreate,
                          ProjectCreateView, ProjectIndexView, ProjectView,
                          ProjectDeleteView, ProjectUpdateView, UserUpdateView)

app_name = 'project'

urlpatterns = [
    path('tracers/', IndexView.as_view(), name='list'),
    path('<int:pk>/', TracerView.as_view(), name='view'),
    path('<int:pk>/update/', TracerUpdateView.as_view(), name='update'),
    path('<int:pk>/delete/', TracerDeleteView.as_view(), name='delete'),
    path('user/<int:pk>', UserUpdateView.as_view(), name="user_update"),
    path('project/add/', ProjectCreateView.as_view(), name='project_add'),
    path('project_tracer/<int:pk>/add/',
         ProjectTracerCreate.as_view(),
         name='project_tracer_add'),
    path('', ProjectIndexView.as_view(), name='project_list'),
    path('project/<int:pk>/', ProjectView.as_view(), name='project_view'),
    path('project/<int:pk>/update/',
         ProjectUpdateView.as_view(),
         name='project_update'),
    path('project/<int:pk>/delete/',
         ProjectDeleteView.as_view(),
         name='project_delete'),
]
Exemplo n.º 4
0
                          ReviewDeleteView, CreateReviewView, ProductList,
                          ProductView, ProductCreate, ProductUpdate,
                          ProductDelete, UserUpdateView)

urlpatterns = [
    path('admin/', admin.site.urls),

    # path('accounts/', include('django.contrib.auth.urls')),
    path('review/', IndexView.as_view(), name='review-list'),
    path('review/add/<int:pk>/', CreateReviewView.as_view(),
         name='review-add'),
    path('review/<int:pk>/', ReviewView.as_view(), name='review-view'),
    path('review/update/<int:pk>/',
         ReviewUpdateView.as_view(),
         name='review-update'),
    path('review/delete/<int:pk>/',
         ReviewDeleteView.as_view(),
         name='review-delete'),
    path('', ProductList.as_view(), name='product-list'),
    path('product/<int:pk>/', ProductView.as_view(), name='product-view'),
    path('product/add/', ProductCreate.as_view(), name='product-add'),
    path('product/update/<int:pk>/',
         ProductUpdate.as_view(),
         name='product-update'),
    path('product/delete/<int:pk>/',
         ProductDelete.as_view(),
         name='product-delete'),
    path('user/add/<int:pk>/', UserUpdateView.as_view(), name='user-add'),
    path('accounts/', include('accounts.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemplo n.º 5
0
from django.urls import path
from webapp.views import ArticleListView, ArticleDetailView,\
    ArticleCreateView, ArticleUpdateView, ArticleDeleteView, UserListView, UserView, UserUpdateView

app_name = 'webapp'

urlpatterns = [
    path('', ArticleListView.as_view(), name='article_list'),
    path('article/<int:pk>',
         ArticleDetailView.as_view(),
         name='article_detail'),
    path('article/<int:pk>',
         ArticleUpdateView.as_view(),
         name='article_update'),
    path('article/<int:pk>',
         ArticleDeleteView.as_view(),
         name='article_delete'),
    path('article/create', ArticleCreateView.as_view(), name='article_create'),
    path('users/', UserListView.as_view(), name='user_list'),
    path('users/<int:pk>', UserView.as_view(), name='user_office'),
    path('users/<int:pk>', UserUpdateView.as_view(), name='user_edit')
]
Exemplo n.º 6
0
    path('logout/', logout_view, name='logout'),
    path('', NewsListTemplateView.as_view(), name='news'),
    path('news_add/', NewsCreateView.as_view(), name='news_add'),
    path('news_detail/<int:pk>/',
         NewsDetailTemplateView.as_view(),
         name='news_detail'),
    path('news_update/<int:pk>/',
         ArticleUpdateView.as_view(),
         name='news_update'),
    path('news_delete/<int:pk>/',
         ArticleDeleteView.as_view(),
         name='news_delete'),
    path('category_list/',
         CategoryListTemplateView.as_view(),
         name='category_list'),
    path('category_add/', CategoryCreateView.as_view(), name='category_add'),
    path('category_update/<int:pk>/',
         CategoryUpdateView.as_view(),
         name='category_update'),
    path('category_delete/<int:pk>/',
         CategoryDeleteView.as_view(),
         name='category_delete'),
    path('user_list/', UserListTemplateView.as_view(), name='user_list'),
    path('user_update/<int:pk>/', UserUpdateView.as_view(),
         name='user_update'),
    path('user_delete/<int:pk>/', UserDeleteView.as_view(),
         name='user_delete'),
    path('api/category/', CategoryView.as_view({'get': 'list'})),
    path('api/news/', NewsApiView.as_view({'get': 'list'})),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemplo n.º 7
0
from django.urls import path
from webapp.views import welcome_view, PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView, \
    UserListView, UserDetailView, UserUpdateView

app_name = 'webapp'

urlpatterns = [
    path('', welcome_view, name='welcome'),
    path('posts', PostListView.as_view(), name='post_list'),
    path('posts/<int:pk>', PostDetailView.as_view(), name='post_detail'),
    path('posts/create', PostCreateView.as_view(), name='post_create'),
    path('posts/<int:pk>/update', PostUpdateView.as_view(),
         name='post_update'),
    path('posts/<int:pk>/delete', PostDeleteView.as_view(),
         name='post_delete'),
    path('users', UserListView.as_view(), name='user_list'),
    path('users/<int:pk>', UserDetailView.as_view(), name='user_detail'),
    path('users/<int:pk>/update', UserUpdateView.as_view(),
         name='user_update'),
]