views:

25

answers:

1

I have a model where I would like to make a custom admin change_form mimicking the behavior of the Add User functionality of the stock Django Admin Interface. That is, I want a two-step action where the user will first input only a device-id and then be taken to a page where he can enter information on the device. Similar to how you first enter username and password on a user and then fill in the other information on the following page. Any ideas?

A: 

I have similiar problem. There is a Map model and Location model in my app. Location exists on map, so it has ForeignKey to the Map model. I've overriden admin/change_form.html, to display map image for the location currently being edited, and user can set location coordinates by clicking on that image (with javascript). But location has to exist in order to know what map it belongs to. So user firstly needs to choose a map for new location, save the location, then pick the coordinates and save again. That what's happening, when we create new user in django admin. Despite user selection, user form is displayed again, but with extra options. Is there a way to copy this behavior in some easy way?

Dzejkob