-2

Good time. How to do following in Django admin:

  1. For example, I have model called Events. I have some events created. I have fields like event name, .... and also field "planning Date"

  2. I need set the same date in "planning Date" field for 5 events.

  3. I am selecting 5 events in checkbox and need in one action do it.

I mean something like delete action for selected objects.

1 Answers1

-1

If your field is a boolean or an action without a user value, you can use admin action: https://docs.djangoproject.com/en/3.1/ref/contrib/admin/actions/#writing-actions

If you need a user value inside, read this : https://www.willandskill.se/en/custom-django-admin-actions-with-an-intermediate-page/

Eric Martin
  • 501
  • 4
  • 10