views:

276

answers:

1

This topic is fairly common (most explicitly detailed here: http://www.hoboes.com/Mimsy/hacks/replicating-djangos-admin/), but I'm still having trouble with it. I'm trying to use the "plus" button functionality used in the admin site where one can add an additional foreign key to a linked entry. In the admin site, a popup displays allowing the user to submit a new field and then that new value is populated on the original form.

I think my issue centers around the inclusion of this line:

within the base.html template and the popadd.html template. Clicking the plus button does not bring up a new window. The popadd template simply loads in the same tab. And submitting a new entry does not take the user back to the original form.

The admin site is functional. I am including ADMIN_MEDIA_PREFIX = '/media/admin/' in the settings.py file. Does it have something to do with where the RelatedObjectLookups.js lives? It's currently in an admin directory outside of my project folder. Do I have to create a symlink?

Sorry for the noob questions. Would appreciate any suggestions (as detailed as possible).

A: 

Here is a more detailed post about how to implement it http://sontek.net/implementing-djangos-admin-interface-pop-ups. I've also created an app you can just include in your project at http://github.com/sontek/django-tekextensions

sontek