diff --git a/appmes/urls.py b/appmes/urls.py index cf79abf..6e70339 100644 --- a/appmes/urls.py +++ b/appmes/urls.py @@ -30,14 +30,11 @@ path('', include('authentication.urls')), path('', include('benefits.urls')), path('', include('offers.urls')), - path('/news/', include('news.urls')), + path('/news/', include('news.urls')), path('admin/', admin.site.urls), ] - - - if settings.DEBUG: from django.conf.urls.static import static urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/authentication/urls.py b/authentication/urls.py index e400cee..e4f415d 100644 --- a/authentication/urls.py +++ b/authentication/urls.py @@ -20,10 +20,10 @@ path('users//', views.UpdateUser.as_view(), name='user_detail'), path('users//delete', views.UserList.as_view(), name='user_delete'), - path('/users/', views.MarketUserList.as_view(), name='user_list'), - path('/users/add/', views.MarketCreateUser.as_view(), name='add_user'), - path('/users//', views.MarketUpdateUser.as_view(), name='user_detail'), - path('/users//delete', views.UserList.as_view(), name='user_delete'), + path('/users/', views.MarketUserList.as_view(), name='user_list'), + path('/users/add/', views.MarketCreateUser.as_view(), name='add_user'), + path('/users//', views.MarketUpdateUser.as_view(), name='user_detail'), + path('/users//delete', views.UserList.as_view(), name='user_delete'), path('register//', views.PreRegister.as_view(), name='preregister'), path('register//resend_email/', views.ResendPreregisterEmailAction.as_view(), name='preregister_send_email'), diff --git a/benefits/urls.py b/benefits/urls.py index 341be4c..f36dea1 100644 --- a/benefits/urls.py +++ b/benefits/urls.py @@ -5,12 +5,12 @@ app_name = 'benefits' urlpatterns = [ - path('/benefits/', views.BenefitList.as_view(), name='list'), - path('/benefits/add/', views.BenefitCreate.as_view(), name='add'), - path('/benefits//', views.BenefitDetail.as_view(), name='detail'), - path('/benefits//edit/', views.BenefitUpdate.as_view(), name='edit'), - path('/benefits//delete/', views.BenefitDelete.as_view(), name='delete'), - path('/providers//add_benefit/', views.BenefitCreate.as_view(), name='add_provider_benefit'), + path('/benefits/', views.BenefitList.as_view(), name='list'), + path('/benefits/add/', views.BenefitCreate.as_view(), name='add'), + path('/benefits//', views.BenefitDetail.as_view(), name='detail'), + path('/benefits//edit/', views.BenefitUpdate.as_view(), name='edit'), + path('/benefits//delete/', views.BenefitDelete.as_view(), name='delete'), + path('/providers//add_benefit/', views.BenefitCreate.as_view(), name='add_provider_benefit'), path('benefit/', views.BenefitDetail.as_view(), name='user_benefit'), diff --git a/market/urls.py b/market/urls.py index b970de6..1790ba3 100644 --- a/market/urls.py +++ b/market/urls.py @@ -13,24 +13,24 @@ path('m//', views.EditMarket.as_view(), name='edit_market'), #### Market management ##### - path('/dashboard/', views.MarketDashboard.as_view(), name='market_dashboard'), + path('/dashboard/', views.MarketDashboard.as_view(), name='market_dashboard'), # Category - path('/categories/', views.CategoryList.as_view(), name='category_list'), - path('/categories/add/', views.CategoryCreate.as_view(), name='add_category'), - path('/categories//', views.CategoryDetail.as_view(), name='category_detail'), + path('/categories/', views.CategoryList.as_view(), name='category_list'), + path('/categories/add/', views.CategoryCreate.as_view(), name='add_category'), + path('/categories//', views.CategoryDetail.as_view(), name='category_detail'), # Providers - path('/providers/', views.ProviderList.as_view(), name='provider_list'), - path('/providers/add/', views.CreateProvider.as_view(), name='add_provider'), - path('/providers//', views.DetailProvider.as_view(), name='provider_detail'), - path('/providers//edit/', views.UpdateProvider.as_view(), name='edit_provider'), + path('/providers/', views.ProviderList.as_view(), name='provider_list'), + path('/providers/add/', views.CreateProvider.as_view(), name='add_provider'), + path('/providers//', views.DetailProvider.as_view(), name='provider_detail'), + path('/providers//edit/', views.UpdateProvider.as_view(), name='edit_provider'), # Consumers - path('/consumers/', views.ConsumerList.as_view(), name='consumer_list'), - path('/consumers/add/', views.CreateConsumer.as_view(), name='add_consumer'), - path('/consumers//', views.ConsumerDetail.as_view(), name='detail_consumer'), - path('/consumers//edit/', views.ConsumerEdit.as_view(), name='edit_consumer'), + path('/consumers/', views.ConsumerList.as_view(), name='consumer_list'), + path('/consumers/add/', views.CreateConsumer.as_view(), name='add_consumer'), + path('/consumers//', views.ConsumerDetail.as_view(), name='detail_consumer'), + path('/consumers//edit/', views.ConsumerEdit.as_view(), name='edit_consumer'), # Single registration account views path('dashboard/', views.UserDashboard.as_view(), name='user_dashboard'), diff --git a/offers/urls.py b/offers/urls.py index f80a2eb..10df1e0 100644 --- a/offers/urls.py +++ b/offers/urls.py @@ -6,9 +6,9 @@ app_name = 'offers' urlpatterns = [ path('offers/', views.UserOffers.as_view(), name='user_list'), - path('/offers/', views.OffersList.as_view(), name='list'), - path('/providers//offers/', views.ProviderOffers.as_view(), name='entity_offers'), - path('/providers//add_offer/', views.CreateOffer.as_view(), name='add'), - path('/offers//', views.OfferDetail.as_view(), name='detail'), - path('/offers//edit/', views.OfferEdit.as_view(), name='edit'), + path('/offers/', views.OffersList.as_view(), name='list'), + path('/providers//offers/', views.ProviderOffers.as_view(), name='entity_offers'), + path('/providers//add_offer/', views.CreateOffer.as_view(), name='add'), + path('/offers//', views.OfferDetail.as_view(), name='detail'), + path('/offers//edit/', views.OfferEdit.as_view(), name='edit'), ] diff --git a/offers/views.py b/offers/views.py index ce9708a..e0ca7f5 100644 --- a/offers/views.py +++ b/offers/views.py @@ -70,7 +70,7 @@ def form_valid(self, form): return HttpResponseRedirect(self.get_success_url()) def get_success_url(self): - messages.add_message(self.request, messages.ERROR, 'Oferta añadida con éxito') + messages.add_message(self.request, messages.SUCCESS, 'Oferta añadida con éxito') return self.reverse('offers:entity_offers', kwargs={'pk': self.kwargs['pk'] })