-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathurls.py
30 lines (22 loc) · 968 Bytes
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from django.urls import path
from . import views
from myequis.views import UpdateRecordView
app_name = 'myequis'
urlpatterns = [
# ex: /myequis/
path('', views.index, name='index'),
# ex: myequis/bicycles/5/
path('bicycles/<int:bicycle_id>/', views.bicycle, name='bicycle'),
# ex: myequis/bicycles/5/records
path('bicycles/<int:bicycle_id>/records', views.records, name='records'),
# ex: myequis/bicycles/5/create_record
path('bicycles/<int:bicycle_id>/create_record', views.create_record, name='create_record'),
# Update record
# ex: myequis/records/4
#path('records/<int:record_id>/', views.record, name='record'),
path('records/<int:record_id>/', UpdateRecordView.as_view(), name='record'),
# ex: myequis/materials/5/
path('<int:material_id>/', views.material, name='material'),
# ex: myequis/newmaterials/
path('newmaterials/', views.newmaterials, name='newmaterials'),
]