2024-11-24 16:45:26 +02:00
""" notes URL Configuration
2024-11-24 14:42:12 +02:00
The ` urlpatterns ` list routes URLs to views . For more information please see :
https : / / docs . djangoproject . com / en / 3.2 / topics / http / urls /
Examples :
Function views
1. Add an import : from my_app import views
2. Add a URL to urlpatterns : path ( ' ' , views . home , name = ' home ' )
Class - based views
1. Add an import : from other_app . views import Home
2. Add a URL to urlpatterns : path ( ' ' , Home . as_view ( ) , name = ' home ' )
Including another URLconf
1. Import the include ( ) function : from django . urls import include , path
2. Add a URL to urlpatterns : path ( ' blog/ ' , include ( ' blog.urls ' ) )
"""
from django . urls import path
2024-11-24 16:45:26 +02:00
from notes import views
2024-11-24 14:42:12 +02:00
urlpatterns = [
2024-11-24 16:11:22 +02:00
path ( ' ' , views . index , name = ' index ' ) ,
2024-11-24 17:58:53 +02:00
path ( ' add/ ' , views . add , name = ' add ' ) ,
path ( ' remove/<int:note_id>/ ' , views . remove , name = ' remove ' ) ,
path ( ' search/ ' , views . search , name = ' search ' ) ,
2024-11-24 16:11:22 +02:00
path ( ' accounts/login/ ' , views . login_view , name = ' login ' ) ,
2024-11-25 16:19:05 +02:00
path ( ' accounts/register/ ' , views . register_view , name = ' register ' ) ,
2024-11-24 16:11:22 +02:00
path ( ' accounts/logout/ ' , views . logout_view , name = ' logout ' ) ,
2024-11-24 14:42:12 +02:00
]