2

Is there any ready apps for django admin, that allows to edit model in popup?

I want next functionallity:

  • View edit form for model in popup.
  • On model save - update row in list of models.

Motivation: reduce page reloads.

Also, if there any solutions oriented on massive manual data updates for django? I've taken a look at django grappelli - it improves view of data, but edit data is still not usable.

P.S.: If such kind of app is not available - I'll start open source project.

Nikolay Fominyh
  • 8,946
  • 8
  • 66
  • 102
  • 1
    I doubt it - ["the admin is not your app"](http://stackoverflow.com/a/677509/16361). You can always write your own CRUD interface that has popups, but the admin is deliberately simplistic in many ways, and there's no current mechanism for in-place updates to model listings - that would be a pretty major change in how it works. – AdamKG Jan 13 '12 at 12:15
  • "The admin is not your app" isn't quite saying what you think it is and in many cases I think it's poor advice. – Andy Baker Nov 23 '12 at 11:00

2 Answers2

8

If you want to open a popup, simply create a link to your 'add' view with the following attribute on that link onclick='return showAddAnotherPopup(this);'

Dmitry
  • 2,068
  • 2
  • 21
  • 30
0

You can do most of what you ask there (at least point 1 and 2) using the django built in admin customisations.

Have a look at https://docs.djangoproject.com/en/dev/ref/contrib/admin/

The django admin itself already uses some things similar to this, pay special attention to the django _popup=1 variable in the request URI.

You will have to add a custom modelname_change_list.html file to provide some javascript and in the ModelAdmin override the delet_view, change_view, response_add and potentially response_change.

Dominic Santos
  • 1,900
  • 12
  • 14