diff --git a/apps/establishment/urls/common.py b/apps/establishment/urls/common.py index 0f2958eb..ff6af5c8 100644 --- a/apps/establishment/urls/common.py +++ b/apps/establishment/urls/common.py @@ -5,7 +5,6 @@ from establishment import views app_name = 'establishment' - urlpatterns = [ path('', views.EstablishmentListView.as_view(), name='list'), path('/', views.EstablishmentRetrieveView.as_view(), name='detail'), @@ -15,5 +14,5 @@ urlpatterns = [ path('/comments//', views.EstablishmentCommentRUDView.as_view(), name='rud-comment'), path('/favorites/', views.EstablishmentFavoritesCreateDestroyView.as_view(), - name='add-favorites'), -] \ No newline at end of file + name='add-favorites') +] diff --git a/apps/establishment/urls/mobile.py b/apps/establishment/urls/mobile.py new file mode 100644 index 00000000..2803be18 --- /dev/null +++ b/apps/establishment/urls/mobile.py @@ -0,0 +1,11 @@ +"""Establishment url patterns.""" +from django.urls import path + +from establishment import views +from establishment.urls.common import urlpatterns as common_urlpatterns + +urlpatterns = [ + path('geo/', views.EstablishmentNearestRetrieveView.as_view(), name='nearest-establishments-list') +] + +urlpatterns.extend(common_urlpatterns) diff --git a/project/urls/mobile.py b/project/urls/mobile.py index c007e260..0bcbd31c 100644 --- a/project/urls/mobile.py +++ b/project/urls/mobile.py @@ -3,10 +3,11 @@ from django.urls import path, include app_name = 'mobile' urlpatterns = [ + path('establishments/', include('establishment.urls.mobile')), # path('account/', include('account.urls.web')), # path('advertisement/', include('advertisement.urls.web')), # path('collection/', include('collection.urls.web')), # path('establishments/', include('establishment.urls.web')), # path('news/', include('news.urls.web')), # path('partner/', include('partner.urls.web')), -] \ No newline at end of file +]