Project_Camper/vagus/camper/urls.py
2021-02-06 12:31:59 +01:00

17 lines
722 B
Python
Executable File

from django.conf.urls import url
from django.urls import path, re_path
from . import views
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
re_path('add-offer/', views.CreateOffer.as_view(), name='create_offer'),
path('offer/<slug:slug>', views.OfferDetailView.as_view(), name = 'offer_detail'),
path('update-offer/<slug:slug>',views.EditOffer.as_view(), name = 'update-offer'),
path('offers/', views.OfferListView.as_view(), name = 'list_offers'),
#path('offer/<slug:slug>', views.OfferDetailView.as_view(), name = 'detail_offer_page'),
path('', views.Home.as_view(), name='homepage')
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)