burke-software / django-mass-edit

Make bulk changes in the Django admin interface
152 stars 67 forks source link

handle object ids in session to overcome URL length limits #64

Closed PetrDlouhy closed 7 years ago

PetrDlouhy commented 8 years ago

This fixes issue #33 by storing all object ids in session.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+0.09%) to 91.398% when pulling b303d7940caac720998f26ea400dac51af55e21d on PetrDlouhy:use_sessions into 612c463ffc79f5ff1af77d44502cdfe352bd841e on burke-software:master.

bufke commented 8 years ago

Hmmm - if I open multiple tabs - horribly unexpected things could happen right? Any ideas about this? It also breaks the ability to share links - though I don't think that is a big use case. It also requires sessions to be enabled in the project.

PetrDlouhy commented 8 years ago

You are right, as I test it now, that behaviour is not optimal. I see several possible solutions of that problem:

  1. Handling some kind of checksum of index of the session stored data in redirect GET parameters.
  2. Avoiding of usage of the redirect between POST and -masschange GET
  3. Handling the IDs somewhere else (i.e. hidden form input). What do you think, about them? Which would you choose or do you have any other?

I see the limited size of edited items as a big drawback of mass-edit, so I think that breaking the ability to share links is not such a problem. If it was, we could leave the object_ids parameter to in the view and place the link somewhere on the masschange page.

bufke commented 7 years ago

Should this be closed in favor of #62 ?