from django.urls import path
from django.conf.urls.static import static
from django.conf import settings
from . import views

app_name = 'djangoapp'
urlpatterns = [
                  # path for about view
                  path(route='about/', view=views.about, name='about'),
                  # path for contact us view
                  path(route='contact/', view=views.contact, name='contact'),
                  # path for registration
                  path('registration/', views.registration_request, name='registration'),
                  # path for login
                  path('login/', views.login_request, name='login'),
                  # path for logout
                  path('logout/', views.logout_request, name='logout'),
                  # Path for initial page index
                  path(route='', view=views.get_dealerships, name='index'),
                  # Path for dealer deteails
                  path(r'^dealer/<int:dealer_id>/dealer_full_name>-(?P<dealer_full_name>>.+?)/$', views.get_dealer_details, name='dealer_details'),
                  # path for add a review view
                  path('add_review/<int:dealer_id>/dealer_full_name>-(?P<dealer_full_name>>.+?)/$', views.add_review, name='add_review'),
              ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

from django.urls import path
from django.conf.urls.static import static
from django.conf import settings
from . import views

app_name = 'djangoapp'
urlpatterns = [
                  # path for about view
                  path(route='about/', view=views.about, name='about'),
                  # path for contact us view
                  path(route='contact/', view=views.contact, name='contact'),
                  # path for registration
                  path('registration/', views.registration_request, name='registration'),
                  # path for login
                  path('login/', views.login_request, name='login'),
                  # path for logout
                  path('logout/', views.logout_request, name='logout'),
                  # Path for initial page index
                  path(route='', view=views.get_dealerships, name='index'),
                  # Path for dealer deteails
                  path(r'^dealer/<int:dealer_id>/dealer_full_name>-(?P<dealer_full_name>>.+?)/$', views.get_dealer_details, name='dealer_details'),
                  # path for add a review view
                  path('add_review/<int:dealer_id>/dealer_full_name>-(?P<dealer_full_name>>.+?)/$', views.add_review, name='add_review'),
              ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

# path for about view # path for contact us view # path for registration # path for login # path for logout # Path for initial page index # Path for dealer deteails # path for add a review view