nebucatnetzer,
@nebucatnetzer@emacs.ch avatar

Does someone using #Django have any experience with django-tables2?

greg,
@greg@gregnewman.io avatar

@nebucatnetzer I'm using it in a project or two.

nebucatnetzer,
@nebucatnetzer@emacs.ch avatar

@greg I have this table:
https://github.com/Nebucatnetzer/network_inventory/blob/add-login-model/src/users/tables.py#L17

And try to add these two columns but I'm stuck:
https://github.com/Nebucatnetzer/network_inventory/blob/add-login-model/src/users/tables.py#L17-L22

Models are here: https://github.com/Nebucatnetzer/network_inventory/tree/add-login-model/src/users/models

The idea is to display all the logins and groups a user belongs to in table.
Would be fantastic if you knew how to do this.

greg,
@greg@gregnewman.io avatar

@nebucatnetzer not at my Mac right now so looking on my phone but I don’t see accessor as a param on manytomany column according to the api.

https://django-tables2.readthedocs.io/en/latest/pages/api-reference.html#django_tables2.columns.ManyToManyColumn

greg,
@greg@gregnewman.io avatar

@nebucatnetzer I’ll pull my code when I get back to my Mac and show how I have it

  • All
  • Subscribed
  • Moderated
  • Favorites
  • django
  • ngwrru68w68
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • InstantRegret
  • GTA5RPClips
  • Youngstown
  • everett
  • slotface
  • rosin
  • osvaldo12
  • mdbf
  • kavyap
  • cubers
  • megavids
  • modclub
  • normalnudes
  • tester
  • khanakhh
  • Durango
  • ethstaker
  • tacticalgear
  • Leos
  • provamag3
  • anitta
  • cisconetworking
  • JUstTest
  • lostlight
  • All magazines