<reponame>MugeraH/Neighbourhood
from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from .views import LandingPageView,HomePageView,NeighbourHoodCreateView,ProfileView,NeigbourhoodDetail,UpdateNeigbourhood,add_business,add_post,update_post,update_business,join_hood,leave_hood,update_profile



app_name ="main"


urlpatterns=[
    
path('home/',HomePageView,name='home'),
path('',LandingPageView.as_view(),name='landing'),

path('join_hood/<int:id>',join_hood,name="join_hood"),
path('leave_hood/<int:id>',leave_hood,name="leave_hood"),


 path('create_hood/',NeighbourHoodCreateView.as_view(),name="create_hood"),
 path('hood/<int:id>', NeigbourhoodDetail,name="hood"),
 path('update_hood/<int:id>', UpdateNeigbourhood,name="update_hood"),
 path('add_business/<int:id>',add_business,name="add_business"),
 path('update_business/<int:id>',update_business,name="update_business"),
 path('add_post/<int:id>', add_post,name="add_post"),
 path('update_post/<int:id>', update_post,name="update_post"),
 
  
path('profile/',ProfileView,name="profile"),
path('update_profile/',update_profile,name="update_profile")

 ]
 
if settings.DEBUG:
    urlpatterns+= static(settings.MEDIA_URL,document_root= settings.MEDIA_ROOT)


from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from .views import LandingPageView,HomePageView,NeighbourHoodCreateView,ProfileView,NeigbourhoodDetail,UpdateNeigbourhood,add_business,add_post,update_post,update_business,join_hood,leave_hood,update_profile



app_name ="main"


urlpatterns=[
    
path('home/',HomePageView,name='home'),
path('',LandingPageView.as_view(),name='landing'),

path('join_hood/<int:id>',join_hood,name="join_hood"),
path('leave_hood/<int:id>',leave_hood,name="leave_hood"),


 path('create_hood/',NeighbourHoodCreateView.as_view(),name="create_hood"),
 path('hood/<int:id>', NeigbourhoodDetail,name="hood"),
 path('update_hood/<int:id>', UpdateNeigbourhood,name="update_hood"),
 path('add_business/<int:id>',add_business,name="add_business"),
 path('update_business/<int:id>',update_business,name="update_business"),
 path('add_post/<int:id>', add_post,name="add_post"),
 path('update_post/<int:id>', update_post,name="update_post"),
 
  
path('profile/',ProfileView,name="profile"),
path('update_profile/',update_profile,name="update_profile")

 ]
 
if settings.DEBUG:
    urlpatterns+= static(settings.MEDIA_URL,document_root= settings.MEDIA_ROOT)