Ok, I got it working, I changed:

>     photo = ImageWithThumbsField(
>             upload_to="site_images",
>             sizes=((270,150),))

to:

     photo = ImageWithThumbsField(
             upload_to="static/site_images",
             sizes=((270,150),))

and

> MEDIA_URL = 'static/'

to:

 MEDIA_URL = '/site_media/'

I think I get it now - the media_root is where django uploads images
to, and the media_url is where the images will be linked from. -
hopefully that is what they mean :)


On Jan 17, 6:06 pm, DragonSlayre <lssay...@gmail.com> wrote:
> I'm using django-thumbs (http://code.google.com/p/django-thumbs/) to
> create some thumbnails for my site:
>
> class Image(models.Model):
>     title = models.CharField(max_length=50, blank=True, null=True)
>     caption = models.CharField(max_length=100, blank=True, null=True)
>     photo = ImageWithThumbsField(
>             upload_to="site_images",
>             sizes=((270,150),))
>
> And in my settings my media path is as following:
>
> MEDIA_ROOT = os.path.abspath(os.path.join(PROJECT_DIR, 'site_media'))
> MEDIA_URL = 'static/'
>
> I'm trying to upload my images into the  'site_media/static/
> site_images/' location
>
> When I upload however, it puts the image into 'site_media/
> site_images/'
> The strange thing though, is that the location that gets stored in the
> database is 'static/site_images/imageName.jpg'
>
> I'm really not sure what's going on, and feel completely confused.
>
> Any help will be greatly appreciated!
>
> Louis
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to