i have 2 type of URL crud/app and other is crud/app/2 here you can see id can be optional, so how to apply this type of URL pattern, here i have added my code,
app_name = 'crud'
urlpatterns = [
path('',views.index, name='index'),
path('add/<:id>',views.add, name='add'),
]