Re: Model for images with thumbnails

2012-01-06 Thread BillB1951
You may want to check out a tutorial on lightbird.net

 link is:  http://www.lightbird.net/dbe/photo.html

Bill


On Jan 6, 6:35 am, MeME  wrote:
> Hello,
>
> I'm new to Django. I started to write something for personal
> purposes.
> I have doubts about writing model for media files, especially images.
> In my app thumbnails should be automatically created when image is
> uploaded. Each such image can have thumnails with different
> dimensions. Images can be attached to posts.
>
> The question is how to store such information in database?
>
> Should it be separate records for each thumbnail and main image? And
> how to keep relationship?
>
> Or maybe I could store everything in one record as a serialized data
> (as in Wordpress)? Then I could as well store there HTML for image and
> metadata.
>
> --
> Regards
> MM

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Model for images with thumbnails

2012-01-06 Thread Andres Reyes
I've found that the most flexible approach is the one taken by
http://thumbnail.sorl.net/

2012/1/6 Иван Иванов :
> На Fri, 6 Jan 2012 07:08:59 -0800 (PST)
> francescortiz  написа:
>
>> you can try https://github.com/francescortiz/image
>
> or you can try https://github.com/SmileyChris/easy-thumbnails
>
>> On 6 ene, 12:35, MeME  wrote:
>> > Hello,
>> >
>> > I'm new to Django. I started to write something for personal
>> > purposes.
>> > I have doubts about writing model for media files, especially
>> > images. In my app thumbnails should be automatically created when
>> > image is uploaded. Each such image can have thumnails with different
>> > dimensions. Images can be attached to posts.
>> >
>> > The question is how to store such information in database?
>> >
>> > Should it be separate records for each thumbnail and main image? And
>> > how to keep relationship?
>> >
>> > Or maybe I could store everything in one record as a serialized data
>> > (as in Wordpress)? Then I could as well store there HTML for image
>> > and metadata.
>> >
>> > --
>> > Regards
>> > MM
>>
>
> --
> 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 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Andrés Reyes Monge
armo...@gmail.com
+(505)-8873-7217

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Model for images with thumbnails

2012-01-06 Thread Иван Иванов
На Fri, 6 Jan 2012 07:08:59 -0800 (PST)
francescortiz  написа:

> you can try https://github.com/francescortiz/image

or you can try https://github.com/SmileyChris/easy-thumbnails

> On 6 ene, 12:35, MeME  wrote:
> > Hello,
> >
> > I'm new to Django. I started to write something for personal
> > purposes.
> > I have doubts about writing model for media files, especially
> > images. In my app thumbnails should be automatically created when
> > image is uploaded. Each such image can have thumnails with different
> > dimensions. Images can be attached to posts.
> >
> > The question is how to store such information in database?
> >
> > Should it be separate records for each thumbnail and main image? And
> > how to keep relationship?
> >
> > Or maybe I could store everything in one record as a serialized data
> > (as in Wordpress)? Then I could as well store there HTML for image
> > and metadata.
> >
> > --
> > Regards
> > MM
> 

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Model for images with thumbnails

2012-01-06 Thread francescortiz
you can try https://github.com/francescortiz/image

On 6 ene, 12:35, MeME  wrote:
> Hello,
>
> I'm new to Django. I started to write something for personal
> purposes.
> I have doubts about writing model for media files, especially images.
> In my app thumbnails should be automatically created when image is
> uploaded. Each such image can have thumnails with different
> dimensions. Images can be attached to posts.
>
> The question is how to store such information in database?
>
> Should it be separate records for each thumbnail and main image? And
> how to keep relationship?
>
> Or maybe I could store everything in one record as a serialized data
> (as in Wordpress)? Then I could as well store there HTML for image and
> metadata.
>
> --
> Regards
> MM

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Model for images with thumbnails

2012-01-06 Thread MeME
Hello,

I'm new to Django. I started to write something for personal
purposes.
I have doubts about writing model for media files, especially images.
In my app thumbnails should be automatically created when image is
uploaded. Each such image can have thumnails with different
dimensions. Images can be attached to posts.

The question is how to store such information in database?

Should it be separate records for each thumbnail and main image? And
how to keep relationship?

Or maybe I could store everything in one record as a serialized data
(as in Wordpress)? Then I could as well store there HTML for image and
metadata.

--
Regards
MM

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.