cnr-ibba / IMAGE-InjectTool

Load IMAGE data into BioSample
https://inject.image2020genebank.eu
GNU General Public License v3.0
3 stars 0 forks source link

django-tables and django filters integration #62

Open bunop opened 4 years ago

bunop commented 4 years ago

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 4 years ago

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