Comments (7)
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.
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.
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.
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?
from django-filer.
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.
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.
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)
- Select a valid choice error when choosing a video file in admin HOT 4
- many errors not appearing to work... HOT 14
- TemplateResponse() instead of render() in views HOT 1
- Optional SVG support with easy-thumbnails HOT 1
- detail_info.html template is incompatible with custom Image models HOT 3
- The request signature we calculated does not match the signature you provided. HOT 1
- Removing an images jumps the screen to the top of the page HOT 2
- Loaddata results in a FieldDoesNotExist error HOT 2
- Thumbnails preview are not generated and missing in admin... HOT 1
- DEFAULT_FILE_STORAGE is deprecated and will be removed in Django 5.1 HOT 2
- Thumbnail Rendering Performance Issue with directory listing HOT 2
- PROBLEM IN TEMPLATE (admin_foler.html) WHEN USING 'FilerFolderField' HOT 4
- PIL.Image.MAX_IMAGE_PIXELS = None will trigger an exception in django-filer HOT 4
- ModelAdmin must define "search_fields", HOT 6
- Crash when moving files from a filtered directory listing in the admin HOT 2
- Moving folders and files with permissions as non superuser takes too long HOT 6
- Error after SVG Upload HOT 2
- Broken on django-storages >= 1.14.4 HOT 1
- Add support for Django 5.1 HOT 2
- Uploading bigger SVG files blocks the UI HOT 23
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-filer.