from django.urls import path from posts.views import PostListView, PostCreateView, PostDeleteView, PostUpdateView app_name = 'posts' urlpatterns = [ path('posts',PostListView.as_view() ,name='posts_blog'), path('criarpost', PostCreateView.as_view(), name='criar_posts'), path('posts/<int:pk>/apagar', PostDeleteView.as_view(), name = 'apagar_post'), path('posts/<int:pk>/editar', PostUpdateView.as_view(), name= 'editar_post'), ]
) from marketing.views import email_list_signup urlpatterns = [ path('admin/', admin.site.urls), # path('', index), path('', IndexView.as_view(), name='home'), # path('blog/', post_list, name='post-list'), path('blog/', PostListView.as_view(), name='post-list'), path('search/', search, name='search'), path('email-signup/', email_list_signup, name='email-list-signup'), # path('create/', post_create, name='post-create'), path('create/', PostCreateView.as_view(), name='post-create'), # path('post/<id>/', post_detail, name='post-detail'), path('post/<pk>/', PostDetailView.as_view(), name='post-detail'), # path('post/<id>/update/', post_update, name='post-update'), path('post/<pk>/update/', PostUpdateView.as_view(), name='post-update'), # path('post/<id>/delete/', post_delete, name='post-delete'), path('post/<pk>/delete/', PostDeleteView.as_view(), name='post-delete'), path('tinymce/', include('tinymce.urls')), path('accounts/', include('allauth.urls')), path('login/', log ,name='login'), path('about/', about ,name='About') ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include from posts.views import ( PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView, like, ) from newsapp.views import index urlpatterns = [ path("admin/", admin.site.urls), path("accounts/", include("allauth.urls")), path("news/", index, name="newsapp"), path("", PostListView.as_view(), name="list"), path("create/", PostCreateView.as_view(), name="create"), path("<slug>/", PostDetailView.as_view(), name="detail"), path("<slug>/update/", PostUpdateView.as_view(), name="update"), path("<slug>/delete/", PostDeleteView.as_view(), name="delete"), path("like/<slug>/", like, name="like"), ]
from django.urls import path from posts.views import (PostCreateView, PostDeleteView, PostDetailView, PostListView) app_name = 'posts' urlpatterns = [ path('', PostListView.as_view(), name='list_post'), path('postar/', PostCreateView.as_view(), name='create_post'), path('post/<int:pk>/', PostDetailView.as_view(), name='detail_post'), path('deletar/<int:pk>/', PostDeleteView.as_view(), name='delete_post'), ]
path('products/buy/<int:id>/', buy_now, name='buy_now'), # Accounts Related path('register/', register_view, name='register'), path('login/', auth_views.LoginView.as_view(template_name='login.html'), name='login'), path('logout/', auth_views.LogoutView.as_view(template_name='logout.html'), name='logout'), # Password related path('password_reset/', auth_views.PasswordResetView.as_view(template_name='password/password_reset.html'), name='password_reset'), path('password_reset_confirm/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(template_name='password/password_reset_confirm.html'), name='password_reset_confirm'), path('password_reset/done', auth_views.PasswordResetDoneView.as_view(template_name='password/password_reset_done.html'), name='password_reset_done'), path('password_reset/complete', auth_views.PasswordResetCompleteView.as_view(template_name="password/password_reset_complete.html"), name='password_reset_complete'), # Profile etc path('profile/', profile, name="profile"), path('preferences/', preference, name="preference"), # Posts related path('posts/', PostListView.as_view(), name='posts'), 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'), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
from posts.views import PostCreateView, PostUpdateView, PostDeleteView, search, news, index, about, post, like, dislike urlpatterns = [ path('admin/', admin.site.urls), path('', index, name='index'), path('blog/', news, name='blog'), path('about/', about, name='about'), path('search/', search, name='search'), path('create/', PostCreateView.as_view(template_name='create.html'), name='create'), path('article/<slug>/<post_id>/update/', PostUpdateView.as_view(template_name='create.html'), name='update-post'), path('article/<slug>/<post_id>/delete/', PostDeleteView.as_view(template_name='post_confirm_delete.html'), name='delete-post'), path('article/<slug>/<int:post_id>/', post, name='post'), path('article/<slug>/<int:post_id>/like/<int:comment_id>/', like, name='like'), path('article/<slug>/<int:post_id>/dislike/<int:comment_id>/', dislike, name='dislike'), path('register/', register, name='register'), path('profile/', profile, name='profile'), path('login/', auth_views.LoginView.as_view(template_name='login.html'), name='login'), path('logout/', auth_views.LogoutView.as_view(template_name='logout.html'),
from django.urls import path from posts.views import PostListView, PostCreateView, PostDetailView, PostUpdateView, PostDeleteView, PostLikeView app_name = 'posts' urlpatterns = [ path('', PostListView.as_view(), name='list'), path('create/', PostCreateView.as_view(), name='create'), path('detail/<int:pk>', PostDetailView.as_view(), name='detail'), path('update/<int:pk>', PostUpdateView.as_view(), name='update'), path('delete/<int:pk>', PostDeleteView.as_view(), name='delete'), path('like/<int:pk>', PostLikeView.as_view(), name='like'), ]
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include from posts.views import (PostListview, PostDetailView, PostUpdateView, PostCreateView, PostDeleteView, like) urlpatterns = [ path('admin/', admin.site.urls), path('accounts/', include('allauth.urls')), path('', PostListview.as_view(), name="list"), path('create/', PostCreateView.as_view(), name="create"), path('<slug>/', PostDetailView.as_view(), name="detail"), path('<slug>/update/', PostUpdateView.as_view(), name="update"), path('<slug>/delete/', PostDeleteView.as_view(), name="delete"), path('like/<slug>/', like, name="like") ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
from django.urls import path from .views import BlogListView, ClientsListView, CashRegister, SaleListView, SaleUpdateView, SaleInvoicePdfView, ProveedoresListView, PurchaseRegister from accounting.views import DashboardView from posts.views import PostCreateView, PostUpdateView, PostDeleteView from inventario.views import ProductListView, ServiceListView, ProveedorCreateView, ProveedorUpdateView urlpatterns = [ path('', DashboardView.as_view(), name='DashboardView'), path('clients/', ClientsListView.as_view(), name='ClientsListView'), path('blog/', BlogListView.as_view(), name='BlogListView'), path('blog/create/', PostCreateView.as_view(), name='post_create'), path('blog/edit/<int:pk>', PostUpdateView.as_view(), name='post_update'), path('blog/delete/<int:pk>', PostDeleteView.as_view(), name='post_delete'), path('productos/', ProductListView.as_view(), name='ProductListView'), path('servicios/', ServiceListView.as_view(), name='ServiceListView'), path('proveedores/', ProveedoresListView.as_view(), name='ProveedoresListView'), path('proveedores/create/', ProveedorCreateView.as_view(), name='prov_create'), path('proveedores/edit/<int:pk>', ProveedorUpdateView.as_view(), name='prov_update'), path('caja/', CashRegister.as_view(), name='CashRegister'), path('sales/', SaleListView.as_view(), name='SaleListView'), path('sales/update/<int:pk>/', SaleUpdateView.as_view(), name='SaleUpdateView'), path('sales/invoice/<int:pk>/', SaleInvoicePdfView.as_view(),
path('admin/', admin.site.urls), # path('', index), path('', IndexView.as_view(), name='home'), # path('blog/', post_list, name='post-list'), path('blog/', PostListView.as_view(), name='post-list'), path('search/', search, name='search'), # path('email-signup/', email_list_signup, name='email-list-signup'), # path('create/', post_create, name='post-create'), path('create/', staff_member_required(PostCreateView.as_view()), name='post-create'), # path('post/<id>/', post_detail, name='post-detail'), path('post/<pk>/', PostDetailView.as_view(), name='post-detail'), # path('post/<id>/update/', post_update, name='post-update'), path('post/<pk>/update/', staff_member_required(PostUpdateView.as_view()), name='post-update'), # path('post/<id>/delete/', post_delete, name='post-delete'), path('post/<pk>/delete/', staff_member_required(PostDeleteView.as_view()), name='post-delete'), path('tinymce/', include('tinymce.urls')), path('accounts/', include('allauth.urls')) ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# path('blog/', post_list, name='post-list'), path('blog/', PostListView.as_view(), name='post-list'), path('search/', SearchView.as_view(), name='search'), path('email-signup/', email_list_signup, name='email-list-signup'), # path('create/', post_create, name='post-create'), path('create/', PostCreateView.as_view(), name='post-create'), path('upload/', upload, name='upload_img'), # path('post/<id>/', post_detail, name='post-detail'), path('post/<str:slug>-<int:pk>/', PostDetailView.as_view(), name='post-detail'), # path('post/<id>/update/', post_update, name='post-update'), path('post/<int:pk>/update/', PostUpdateView.as_view(), name='post-update'), # path('post/<id>/delete/', post_delete, name='post-delete'), path('post/<int:pk>/delete/', PostDeleteView.as_view(), name='post-delete'), path('contact/', ContactView, name='contact'), path('vote/', VoteView, name='vote_post'), path('practice/', PracticeView, name='practice'), path('searchbycat/<category>/', blog_category, name='searchbycat'), path('searchbytag/<tags>/', blog_tags, name='searchbytag'), path('tinymce/', include('tinymce.urls')), path('accounts/', include('allauth.urls')), path('accounts/profile/', user_dashboard.as_view(), name='profile') ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL,
from posts.views import PostListView, UserProfileDetailView, \ UserProfileEditView, PostCreateView, PostDetailView, PostEditView, \ PostDeleteView, VoteFormView, PostListAllView urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), url(r'^$', PostListView.as_view(), name='home'), url(r'^zakopalisko/$', PostListAllView.as_view(), name='lounge'), url(r'^login/$', "django.contrib.auth.views.login", {"template_name": "registration/login.html"}, name="login"), url(r'^logout/$', "django.contrib.auth.views.logout_then_login", name="logout"), url(r'^accounts/', include('registration.backends.simple.urls')), url(r'^users/(?P<slug>\w+)/$', UserProfileDetailView.as_view(), name='profile'), url(r'^edit_profile/$', login_required(UserProfileEditView.as_view()), name='edit_profile'), url(r'^post/create/$', login_required(PostCreateView.as_view()), name='create_post'), url(r'^post/(?P<pk>\d+)$', PostDetailView.as_view(), name='post_detail'), url(r'^post/edit/(?P<pk>\d+)$', login_required(PostEditView.as_view()), name='post_edit'), url(r'^post/delete/(?P<pk>\d+)$', login_required(PostDeleteView.as_view()), name='post_delete'), url(r'^vote/$', login_required(VoteFormView.as_view()), name="vote"), )
from django.urls import path from posts.views import index, PostListView, PostDeleteView, PostUpdateView, PostDetailView, PostCreateView app_name = 'posts' urlpatterns = [ path("", index, name="index"), path("allposts", PostListView.as_view(), name="allposts"), path("deletepost/<int:pk>/", PostDeleteView.as_view(), name="deletepost"), path("update/<int:pk>/", PostUpdateView.as_view(), name="update"), path("detail/<int:pk>/", PostDetailView.as_view(), name="detail"), path("create", PostCreateView.as_view(), name="create"), ]
path("register/", users_views.register, name="register"), path('login/', auth_views.LoginView.as_view(template_name='users/login.html'), name='login'), path('logout/', auth_views.LogoutView.as_view(template_name='users/logout.html'), name='logout'), path("", index), path("", IndexView.as_view(), name="home"), path("blog/", post_list, name="post-list"), path("blog/", PostListView.as_view(), name="post-list"), path("search/", search, name="search"), path("email-signup/", email_list_signup, name="email-list-signup"), path("create/", post_create, name="post-create"), path("create/", PostCreateView.as_view(), name="post-create"), path("post/<id>/", post_detail, name="post-detail"), path("post/<pk>/", PostDetailView.as_view(), name="post-detail"), path("post/<id>/update/", post_update, name="post-update"), path("post/<pk>/update/", PostUpdateView.as_view(), name="post-update"), path("post/<id>/delete/", post_delete, name="post-delete"), path("post/<pk>/delete/", PostDeleteView.as_view(), name="post-delete"), path("tinymce/", include("tinymce.urls")), path("accounts/", include("allauth.urls")), ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.urls import path from posts.views import PostListView, PostDeleteView, PostDetailView, PostUpdateView app_name = 'posts' urlpatterns = [ path('', PostListView.as_view(), name='posts-list'), path('<int:id>/detail/', PostDetailView.as_view(), name='posts-detail'), path('<int:id>/update/', PostUpdateView.as_view(), name='posts-update'), path('<int:id>/delete/', PostDeleteView.as_view(), name='posts-delete') ]
# This file means from django.urls import path from posts.views import PostListView, PostCreateView, PostUpdateView, PostDeleteView app_name = 'posts' urlpatterns = [ path('showPosts', PostListView.as_view(), name='showPosts'), path('createposts', PostCreateView.as_view(), name='createPosts_posts'), path('posts/<int:pk>/alterar', PostUpdateView.as_view(), name='update_post'), path('posts/<int:pk>/deletar', PostDeleteView.as_view(), name='delete_post'), ]
from django.conf.urls import url from posts.views import PostDetailView, PostListView, PostCreateView, PostUpdateView, PostDeleteView # post_list_view urlpatterns = [ #url(r'^$', post_list_view, 'list'), url(r'^$', PostListView.as_view(), name='list'), url(r'^create/$', PostCreateView.as_view(), name='create'), url(r'^(?P<pk>\d+)/$', PostDetailView.as_view(), name='detail'), url(r'^(?P<pk>\d+)/update/$', PostUpdateView.as_view(), name='update'), url(r'^(?P<pk>\d+)/delete/$', PostDeleteView.as_view(), name='delete'), ]
path('blog/', PostListView.as_view(), name='post-list'), path('search/', search, name='search'), path('email-signup/', email_list_signup, name='email-list-signup'), # path('create/', post_create, name='post-create'), path('create/', permission_required('post_create')(PostCreateView.as_view()), name='post-create'), # path('post/<id>/', post_detail, name='post-detail'), path('post/<pk>/', PostDetailView.as_view(), name='post-detail'), # path('post/<id>/update/', post_update, name='post-update'), path('post/<pk>/update/', permission_required('post_update')(PostUpdateView.as_view()), name='post-update'), # path('post/<id>/delete/', post_delete, name='post-delete'), path('post/<pk>/delete/', permission_required('post-delete')(PostDeleteView.as_view()), name='post-delete'), path('tinymce/', include('tinymce.urls')), path('ckeditor/', include('ckeditor_uploader.urls')), path('accounts/', include('allauth.urls')), #self try categories path('category/<slug:cat>', cat_detail, name='cat-detail'), #contact path('contact', contact, name="contact"), path('message', message, name="message"), path('login', loginPage, name='login'), path('register', register, name='register'), path('logout', logoutUser, name='logout'),
1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include from posts.views import ( PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView, ) urlpatterns = [ path('admin/', admin.site.urls), path('accounts/', include('allauth.urls')), path('', PostListView.as_view(), name='list'), path('create/', PostCreateView.as_view(), name='create'), path('<slug>/', PostDetailView.as_view(), name='detail'), path('<slug>/update', PostUpdateView.as_view(), name='update'), path('<slug>/delete', PostDeleteView.as_view(), name='delete'), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, include from posts.views import ( PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView, like, ) urlpatterns = [ path('admin/', admin.site.urls), path('accounts/', include('allauth.urls')), path('', PostListView.as_view(), name='list'), path('create/', PostCreateView.as_view(), name='create'), path('posts/<slug>/', PostDetailView.as_view(), name='detail'), path('posts/<slug>/update/', PostUpdateView.as_view(), name='update'), path('posts/<slug>/delete/', PostDeleteView.as_view(), name='delete'), path('like/<slug>/', like, name='like'), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
from django.urls import path from posts.views import PostDeleteView, PostsList from .views import (DashboardView, LoginView, PostCreateView, PostUpdateView, RegisterView, logout_view) urlpatterns = [ # Dashboard Related Urls path('', DashboardView.as_view(), name="dashboard"), # Auth related urls path('login/', LoginView.as_view(), name="login"), path('register/', RegisterView.as_view(), name="register"), path('logout/', logout_view, name="logout"), # Post related urls path('create/post/', PostCreateView.as_view(), name="create_post"), path('posts/<slug>/update/', PostUpdateView.as_view(), name="edit_post"), path('posts/', PostsList.as_view(template_name="accounts/admin/posts.html"), name="list_posts"), path('posts/<slug>/delete/', PostDeleteView.as_view(), name="delete_post") ]