cnr-ibba/IMAGE-InjectTool

django-tables and django filters integration

Opened this issue · 1 comments

bunop commented

Is your feature request related to a problem? Please describe.
Diango tables and filter could be used to sort intems in tables or filtering record of a particoular interest (like the data with errors in validation or the terms belonging to a particoular language). Could be useful also in selecting items

Describe the solution you'd like
Those two django modules should be adopted an integrated in views, like translation tables and submission edit view

Describe alternatives you've considered
We could manipulate page views using custom queryset managed bt get methods, however this is already implemented in django modules

Additional context
I have already implemented a fake project using this modules here

bunop commented

Maybe it could be useful to generate a view like this:

SELECT ROW_NUMBER() OVER () AS id, 
       * 
  FROM (SELECT id AS model_id, 
               submission_id, 
               name, 
               material, 
               biosample_id, 
               status, 
               last_changed, 
               last_submitted 
          FROM uid_animal 
         UNION SELECT id AS model_id, 
               submission_id, 
               name, 
               material, 
               biosample_id, 
               status, 
               last_changed,
               last_submitted 
          FROM uid_sample 
         ORDER BY material, 
               model_id
       ) AS t1

In order to get a not-managed model and simplify data export as CSV and sorting and filtering with django-tables