Hi I'm a novice/intermediate with python and very new to Django and web apps. I've been able to figure out most of getting my app running, and handling basic input/output.
I'm starting to work on formatting my data for the end user and I found django-tables2 which looks very promising, but I'm having trouble customizing it how I want.
Basically django-tables2 takes in a some data directly from a model, and formats it like so:
+------------------------+
| ID | Foo | Bar | Num |
+------------------------+
| 1 | Foo1 | Bar1 | 20 |
| 2 | Foo1 | Bar2 | 25 |
| 3 | Foo2 | Bar1 | 30 |
| 4 | Foo2 | Bar2 | 30 |
+------------------------+
(This is somewhat based on my data, but the gist is that it displays a row for each ID).
What I want to do is change it so the data is organized like this:
+--------------------+
| Foos | Bar1 | Bar2 |
+--------------------+
| Foo1 | 20 | 25 |
| Foo2 | 30 | 30 |
+--------------------+
My code for this so far is almost identical to what can be found in the django-tables2 tutorial, and only works in the first way. I've played around with manually changing the column names, and even got part way through building it out myself through a template, but I got stuck on filling the values to the correct location.
I'm open to any ways of solving my issue.
BONUS: I've been able to use forms to successfully add data to my table, but I'd like to be able to add the data in the table itself. (like a spreadsheet)
I looked into using jquery which I think has many ways to solve this, but I know almost nothing about it and it seems like I would have to spend a lot of time playing catch-up to use it. Any ideas here?*