Closed A4TIF closed 4 years ago
I can't seem to figure out this error, is there something I'm doing wrong?
Error: TypeError: 'MessageImage_AjaxCRUD' object is not callable
TypeError: 'MessageImage_AjaxCRUD' object is not callable
class MessageImage_AjaxCRUD(InlineAjaxCRUD): namespace = 'backend' check_perms = True check_login = True model = MessageImage base_model = Message inline_field = 'message' fields = ['image', ] title = _("Images") class MessageCRUD(CRUDView): namespace = 'backend' check_perms = True check_login = True model = Message inlines = [MessageImage_AjaxCRUD] list_fields = ['product', 'message'] list_filter = ['product']
In project urls.py: re_path(r'^', include('backend.urls')),
re_path(r'^', include('backend.urls')),
In my app backend/urls.py:
app_name = 'backend' message_view = crud_views.MessageCRUD() urlpatterns = [ ... path('', include(message_view.get_urls())), ... ]
Using: Python 3.7.4 Django version 2.2.4
If I remove the namespace from views, the action links are not visible and get 404 errors in update pages :(
Looks like moving my app's urlpattern to project url.py and removing namespaces worked. Not sure if this is how it was designed to work.
I can't seem to figure out this error, is there something I'm doing wrong?
Error:
TypeError: 'MessageImage_AjaxCRUD' object is not callable
In project urls.py:
re_path(r'^', include('backend.urls')),
In my app backend/urls.py:
Using: Python 3.7.4 Django version 2.2.4
If I remove the namespace from views, the action links are not visible and get 404 errors in update pages :(