On 6/12/07, Rob Hudson <[EMAIL PROTECTED]> wrote: > > One thought I had to counter that would be to group small images > together, then medium sized images, then large images. Depending on > how many images your website actually uses, this would need to be > tuned, but maybe it would help alleviate the wait. Also, grouping
One of the ideas in my mind to extend this proof of concept was "named bundles". I was looking at them because of CSS issues, but same can be applied to both. I like the simplicity here, that you do not have to define bundles and use them in two separate steps, but what google does, making creation of bundle a conscious extra step, a little bit of hassle but more flexible for such requirements. Lets say we write a command line script "create_bundle" [lets say, part of manager.py if it gets to django proper], that will take a bundle name, and a set of images as input and create the bundle. Then in template files we can refer to the bundle names in {% img %} tag. create_bundle script will have to store the metadata about the names of images that have gone in the bundle and their relative order in some other place. These are additional complexities to tackle, nothing really difficult, a little inconvenient. We can probably go with both kind of bundles, if {% img %} supplies a bundle name, use named bundle, otherwise do what is being done current. Anyway, it's an interesting idea and nice to see an implementation. On 6/12/07, Justin Lilly <[EMAIL PROTECTED]> wrote: Also, I'm not sure if this is bug or design, but if you use this method, you > can't save the picture without a rather large hassel. > I am not sure I understood your concern here. There are many things wrong, its just a prototype, I am assuming the images are /static/something.ext and are all saved in the MEDIA_DIRECTORY. Suggestions welcome. [I was thinking what if the images are served from a different host, S3?, all those cases will cause problems and will have to be thought before it can go beyond prototype stage to candidate for contrib]. On 6/13/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > I really like this idea, but my needs are different. > > I don't need resizing of images in the bundle, and I don't like the > idea of loading all the original images in the bundle to determine > offsets in the final. Server side resizing was compulsory as otherwise the background technique would not work. AFAIK. Browser will just show the part of image, and does not shrink the background to fit. I see you're using mx.Misc.OrderedMapping. Does that do anything that > django.utils.datastructures.SortedDict doesn't do? > Nothing, I dint knew about it. -- Amit Upadhyay Vakow! www.vakow.com +91-9820-295-512 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---