GithubHelp home page GithubHelp logo

Comments (7)

 avatar commented on September 1, 2024

I was able to fix this by overriding _media on my inline class and provide a new inlines.min.js file.

The key was to add img and span to the selector used in that class to reset ids and adding or removing inlines. It was input,select,textarea,label,a and I changed it to input,select,textarea,label,a,img,span

from django-filer.

stefanfoulis avatar stefanfoulis commented on September 1, 2024

thanks for the pointer. I guess we could provide a InlineAdmin subclass that does that. But it would be unintuitive to developers if they have to use a special subclass just so the FileField works. I'll have a look at the markup. Maybe we can change the widget markup in a way that it works with the standard inlines.min.js

from django-filer.

 avatar commented on September 1, 2024

what's strange to me is that it worked in django 1.2.4 but not 1.2.5. I was trying to figure out what changed, but no luck yet. looks like inlines.min.js is the same between the two versions.

I would agree that changing the mark-up would probably be the best route. Providing an InlineAdmin sublcass and the new inlines.min.js file would definitely be unintuitive.

from django-filer.

stefanfoulis avatar stefanfoulis commented on September 1, 2024

Actually the widget markup changed a bit recently. We added a link to the full size image and moved from generating the markup in python code to using a template.
It's pretty surprising the whole thing works with that change of yours... after all there is a bunch of javascript in there. How could that ever be cloned correctly?

https://github.com/stefanfoulis/django-filer/blob/develop/filer/templates/admin/filer/widgets/admin_file.html

from django-filer.

 avatar commented on September 1, 2024

oh, i was saying that inlines.min.js is the same. only difference I can tell from the widget markup is that in django 1.2.4 the label tag still has 'prefix' in it's for attribute. where in 1.2.5 it has the new index of the inline. not sure if that is making a difference. doesn't look like you control that label though, django does. yeah, my fix is a complete hack. inlines.min.js just provides functions to resync up ids when you add or delete inlines so I changed the selectors to include img and span.

from django-filer.

stefanfoulis avatar stefanfoulis commented on September 1, 2024

I can't re-produce the error in django-1.3 and have not tested it yet in django-1.2.x.
This seems to be an issue exclusively in django-1.2.5.

from django-filer.

stefanfoulis avatar stefanfoulis commented on September 1, 2024

I checked this again with the current versions (django-filer develop, django 1.4) and could not reproduce it. Since this seems to be a django-1.2.x issue and we're dropping official 1.2.x support, I'm closing this issue.

from django-filer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.