shymonk/django-datatable

Ajax data loading doesn't work in production

vilos opened this issue · 1 comments

vilos commented

When serving requests with multiple processes in production the tables get registered in TableDataMap with different keys in each process, because each process creates random tokens as keys created by uuid4() function. Then if an ajax request is handled by different process from the one rendering templates the token in url cannot be found in TableDataMap.map and Ajax error is shown.

The problem can be solved by using consistent string for keys when registering models in TableDataMap, I have successfully used a hash of table class name.

I had the same problem, thx