I am working on a photo portfolio site at the moment and for the
gallery side of things, I am using django-photologue to provide much
of the backend muscle. It's working great so far but I really want to
use an image slider/carousel to provide a nice, slick way of
navigating the photos.
I am reckoning the best way to do this is to grab all the photos in a
gallery and slap them into a JSON string, which is then fed through my
slider script. So far, I have got the data into a serialized array
using:
gallery_thumbs_json_s = serializers.serialize('json', gallery_thumbs,
fields=('image', 'title', 'caption', 'tags', 'title_slug',
'date_taken'))
Where I am now stuck, is how to use this as JSON in my script. I have
read that deserialize is the way to do it but I can't get my head
around what comes after deserialize.
Any pointers would be much appreciated.
Cheers,
Dave
--
---------------------------------------
Dave Sayer | Bath Design
Web design & development with standards
---------------------------------------
mobile: +44 (0)7702787436
email: da...@bathdesign.co.uk
web: http://bathdesign.co.uk
twitter: http://twitter.com/sweet_grass
photography: http://luxumbra.co.uk
---------------------------------------
I have called the gallery_thumbs_json variable in my template and get
a very comprehensive array of data, which is nice. I have then set
this as a js var and then passed that to my javascript via eval(),
which gives me a nicely formatted array but i can't work out how to
access specific data in the array. I'll have a hunt around on google.
I think this is now a bit off topic for the Django list.
Thanks for your help.
Dave
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>
>
--
---------------------------------------
Dave Sayer | Bath Design
Web design & development with standards
---------------------------------------
mobile: +44 (0)7702787436
email: da...@bathdesign.co.uk