Registered path for nearest establishments

This commit is contained in:
Semyon 2019-09-12 14:25:03 +03:00
parent 5943839eda
commit bdc2c327f6
3 changed files with 15 additions and 4 deletions

View File

@ -5,7 +5,6 @@ from establishment import views
app_name = 'establishment' app_name = 'establishment'
urlpatterns = [ urlpatterns = [
path('', views.EstablishmentListView.as_view(), name='list'), path('', views.EstablishmentListView.as_view(), name='list'),
path('<int:pk>/', views.EstablishmentRetrieveView.as_view(), name='detail'), path('<int:pk>/', views.EstablishmentRetrieveView.as_view(), name='detail'),
@ -15,5 +14,5 @@ urlpatterns = [
path('<int:pk>/comments/<int:comment_id>/', views.EstablishmentCommentRUDView.as_view(), path('<int:pk>/comments/<int:comment_id>/', views.EstablishmentCommentRUDView.as_view(),
name='rud-comment'), name='rud-comment'),
path('<int:pk>/favorites/', views.EstablishmentFavoritesCreateDestroyView.as_view(), path('<int:pk>/favorites/', views.EstablishmentFavoritesCreateDestroyView.as_view(),
name='add-favorites'), name='add-favorites')
] ]

View File

@ -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)

View File

@ -3,6 +3,7 @@ from django.urls import path, include
app_name = 'mobile' app_name = 'mobile'
urlpatterns = [ urlpatterns = [
path('establishments/', include('establishment.urls.mobile')),
# path('account/', include('account.urls.web')), # path('account/', include('account.urls.web')),
# path('advertisement/', include('advertisement.urls.web')), # path('advertisement/', include('advertisement.urls.web')),
# path('collection/', include('collection.urls.web')), # path('collection/', include('collection.urls.web')),