From a726308074ffe4e87bd50336a5fe62d1a7f26afb Mon Sep 17 00:00:00 2001 From: Tudor Amariei Date: Sat, 27 Jan 2024 12:48:30 +0200 Subject: [PATCH] Update URLs --- backend/redirectioneaza/urls.py | 60 ++++++++++++++++----------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/backend/redirectioneaza/urls.py b/backend/redirectioneaza/urls.py index c30ab5bb..e92e037e 100644 --- a/backend/redirectioneaza/urls.py +++ b/backend/redirectioneaza/urls.py @@ -2,7 +2,7 @@ URL configuration for the redirectioneaza project. The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/4.2/topics/http/urls/ + https:/docs.djangoproject.com/en/4.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views @@ -61,60 +61,60 @@ path("ong/", ForNgoHandler.as_view(), name="ngo"), path("pentru-ong-uri/", RedirectView.as_view(pattern_name="ngo", permanent=True)), # backup in case of old urls. to be removed - path("asociatii", NgoListHandler.as_view()), + path("asociatii/", NgoListHandler.as_view()), path("termeni/", TermsHandler.as_view(), name="terms"), path("TERMENI/", RedirectView.as_view(pattern_name="terms", permanent=True)), path("nota-de-informare/", NoteHandler.as_view(), name="note"), path("politica/", PolicyHandler.as_view()), path("despre/", AboutHandler.as_view()), # account management - path("cont-nou", SignupHandler.as_view()), - path("login", LoginHandler.as_view(), name="login"), - path("logout", LogoutHandler.as_view(), name="logout"), - path("forgot", ForgotPasswordHandler.as_view(), name="forgot"), + path("cont-nou/", SignupHandler.as_view()), + path("login/", LoginHandler.as_view(), name="login"), + path("logout/", LogoutHandler.as_view(), name="logout"), + path("forgot/", ForgotPasswordHandler.as_view(), name="forgot"), # verification url: used for signup, and reset password path( - "verify//-", + "verify//-/", VerificationHandler.as_view(), - name="verification", + name="verification/", ), - path("password", SetPasswordHandler.as_view()), + path("password/", SetPasswordHandler.as_view()), # my account - path("contul-meu", MyAccountHandler.as_view(), name="contul-meu"), - path("asociatia", NgoDetailsHandler.as_view(), name="asociatia"), - path("date-cont", MyAccountDetailsHandler.as_view(), name="date-contul-meu"), + path("contul-meu/", MyAccountHandler.as_view(), name="contul-meu"), + path("asociatia/", NgoDetailsHandler.as_view(), name="asociatia"), + path("date-cont/", MyAccountDetailsHandler.as_view(), name="date-contul-meu"), # APIs - path("api/ngo/check-url/", CheckNgoUrl.as_view(), name="api-ngo-check-url"), - path("api/ngos", NgosApi.as_view(), name="api-ngos"), + path("api/ngo/check-url//", CheckNgoUrl.as_view(), name="api-ngo-check-url"), + path("api/ngos/", NgosApi.as_view(), name="api-ngos"), # # # TODO: all the URLs until END_OF_TODO need to be implemented # - path("webhook", Webhook.as_view(), name="webhook"), - path("api/ngo/upload-url", GetUploadUrl.as_view(), name="api-ngo-upload-url"), # TODO - path("api/ngo/form/", GetNgoForm.as_view(), name="api-ngo-form-url"), - path("api/ngo/forms/download", GetNgoForms.as_view(), name="api-ngo-forms"), + path("webhook/", Webhook.as_view(), name="webhook"), + path("api/ngo/upload-url/", GetUploadUrl.as_view(), name="api-ngo-upload-url"), # TODO + path("api/ngo/form//", GetNgoForm.as_view(), name="api-ngo-form-url"), + path("api/ngo/forms/download/", GetNgoForms.as_view(), name="api-ngo-forms"), # Cron routes - path("cron/stats", Stats.as_view()), - path("cron/ngos/remove-form", NgoRemoveForms.as_view(), name="ngo-remove-form"), - path("cron/ngos/export", NgoExport.as_view()), - path("cron/export/custom", CustomExport.as_view()), + path("cron/stats/", Stats.as_view()), + path("cron/ngos/remove-form/", NgoRemoveForms.as_view(), name="ngo-remove-form"), + path("cron/ngos/export/", NgoExport.as_view()), + path("cron/export/custom/", CustomExport.as_view()), # # END_OF_TODO # # Django Admin path("admin/django/", django_admin.site.urls), # ADMIN HANDLERS - path("admin/campanii", SendCampaign.as_view(), name="admin-campanii"), - path("admin/ong-nou", AdminNewNgoHandler.as_view(), name="admin-ong-nou"), - path("admin/conturi", UserAccounts.as_view(), name="admin-users"), - path("admin/organizatii", AdminNgosList.as_view(), name="admin-ngos"), - path("admin/", AdminNgoHandler.as_view(), name="admin-ong"), + path("admin/campanii/", SendCampaign.as_view(), name="admin-campanii"), + path("admin/ong-nou/", AdminNewNgoHandler.as_view(), name="admin-ong-nou"), + path("admin/conturi/", UserAccounts.as_view(), name="admin-users"), + path("admin/organizatii/", AdminNgosList.as_view(), name="admin-ngos"), + path("admin//", AdminNgoHandler.as_view(), name="admin-ong"), path("admin/", AdminHome.as_view(), name="admin-index"), # name was "admin" # must always be the last set of urls - re_path(r"^(?P[\w-]+)/doilasuta", RedirectView.as_view(pattern_name="twopercent", permanent=True)), - re_path(r"^(?P[\w-]+)/semnatura", FormSignature.as_view(), name="ngo-twopercent-signature"), - re_path(r"^(?P[\w-]+)/succes", DonationSucces.as_view(), name="ngo-twopercent-success"), + re_path(r"^(?P[\w-]+)/doilasuta/", RedirectView.as_view(pattern_name="twopercent", permanent=True)), + re_path(r"^(?P[\w-]+)/semnatura/", FormSignature.as_view(), name="ngo-twopercent-signature"), + re_path(r"^(?P[\w-]+)/succes/", DonationSucces.as_view(), name="ngo-twopercent-success"), re_path(r"^(?P[\w-]+)/$", TwoPercentHandler.as_view(), name="twopercent"), ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)