django-nested-inlines icon indicating copy to clipboard operation
django-nested-inlines copied to clipboard

nested.js?

Open jws325 opened this issue 11 years ago • 7 comments

After installing your app, I get a 404 for http://(mywebsite)/media/admin/js/nested.js I also get about 12 of these messages in the js console: TypeError: Object #<Object> has no method 'tabularFormset'

Could these errors be due to the fact that your .js file is named inline.js instead of nested.js?

jws325 avatar Mar 11 '13 07:03 jws325

Despite all the other myriad problems I seem to have, I haven't run into this. Do you have more specifics? Might you have just not added the app to installed apps?

alexwhittemore avatar Apr 19 '13 05:04 alexwhittemore

I'm having the same problem back here.

I can run the code and access the admin code, but it fails to load nested.js

I can't manage to have the '+' button to add new instances of objects, don't know if this has something to do with not being available to load this JavaScript file.

Thank you for attending the issue ;-)

OscarPDR avatar May 08 '13 16:05 OscarPDR

Definitely, a nested.js file is missing in the static/admin/js folder, which is in charge of defining the 'stackedFormset' and 'tabularFormset' methods.

Are you intending to solve the bug soon?

Thank you for caring

OscarPDR avatar May 10 '13 13:05 OscarPDR

You can hotfix this by overriding the template admin and css and creating the nested.js from a copy of inlines.min.js which can be found in the package.

Refer to https://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates to know how to set and override 3rd party statics / templates.

laucia avatar May 31 '13 15:05 laucia

@laucia, can you explain what you mean about overriding the template admin and css? I ran cp /Users/myhome/.virtualenvs/myproj/src/django-nested-inlines/nested_inlines/static/admin/js/inlines.js /Users/myhome/.virtualenvs/myproj/src/django-nested-inlines/nested_inlines/static/admin/js/nested.js and while the attempt to load nested.js no longer fails on a 404, nothing changes in terms of the admin page's behavior.

Thanks!

christianpbrink avatar Jul 15 '13 15:07 christianpbrink

I have a 3rd_party/static/admin in my project and copied it in a js subdirectorie but yeah basically i did the same. It solved some formset issue with 3-level deep inlines but i didn't take anytime to look into the code to see what's the use sry. But feel free to enlighten us if you do !

laucia avatar Jul 15 '13 16:07 laucia

Pull request #13 fixes this issue although it was never accepted.

@Soaa- Thanks for this lovely Django addition - are you no longer interested in maintaining it? It seems such a pity to let it die like this...

bee-keeper avatar Apr 30 '14 16:04 bee-keeper