-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple placeholder columns causes error. Single placeholder column works. #89
Comments
Thank you @LegendaryFire , I'll flag this as a bug to be investigated, but since I work on this project occasionally I can't guarantee any time schedule |
Thanks for the prompt response @klavman. For any others who may experience the same issue, a temporary workaround would be to use a column which can be mapped to a field in the model instead of adding an additional placeholder column. See the example below.
Simply set the |
Update: Even with one placeholder, the problem still persists unfortunately. |
@LegendaryFire hopefully I'll be able to check this during the next weekend. |
@morlandi No problem. I'll take a good look and see if perhaps I can come up with a solution as well. Thank you for your hard work, this really is the way to go when working with tables in Django |
@morlandi hello hope you're well :-). Did you work on this placeholder bug ? I expérience the same problem for now. |
Hello @tboulogne, nice to hear of you. I haven't been actively involved in the project for some time because I'm busy with other activities. I take this opportunity to wish you a happy new year ;) Mario |
Hello Mario, I wish you a pleasant year too :-) ! Hope your best wishes comes to reality. I hope to find some time to look into this too :-). Keep in touch. Thierry |
I think it's quite normal. We are on server-aide mode. Queryset did not know about placeholder field... as datatables knows... So placeholder should not be orderable or filterable... |
For some reason, when using placeholder columns, only one can be used. However, when two or more placeholder columns are required the following error is thrown.
Exception: Column 1 ("custom_column_2") is not orderable.
Here is some sample code.
Then, if I try setting
custom_column_1
andcustom_column_2
to be orderable, the following error occurs.File "C:\Users\User1\PycharmProjects\djangoProject1\venv\lib\site-packages\django\db\models\sql\query.py", line 1677, in names_to_path raise FieldError( django.core.exceptions.FieldError: Cannot resolve keyword 'custom_column_2' into field. Choices are: first_name, last_name, birth_month, birth_day
The text was updated successfully, but these errors were encountered: