Closed michaeldacanay closed 1 year ago
they can be named anyway you like long as they are the same in the path and the table
"{% url 'ajax_datatable_permissions' %}" is the endpoint to the specialized view
urlpatterns = [ path('ajax_datatable/permissions/', ajax_datatable_views.PermissionAjaxDatatableView.as_view(), name="ajax_datatable_permissions"), ]
Yes, any path will do as long as you're consistent in registering it with initialize_table()
:
AjaxDatatableViewUtils.initialize_table(
$('#datatable_permissions'),
"{% url 'ajax_datatable_permissions' %}",
...
Sorry if I wasn't clear. I was referring more to the first parameter of the path (function?). But I think it can also be named anything, although I don't think it has a match anywhere else in the code.
you can either write:
"{% url 'ajax_datatable_permissions' %}"
or
/ajax_datatable/permissions/
So far, in the documentation, most paths had
ajax_datatable/
in the URL path. Is this arbitrarily named or does that path need to start with that? For example, could I name the url path nameajax-datatable/tracks
?