Re: problem with ImageField does not show me the picture on a template

2013-05-23 Thread Ronny Villarroel Mendoza
Thanks a lot. I do the following steps: aggregate an alias to the virtual host of my site: Alias /media /var/www/fourweb/media/ and modified: settings.MEDIA_ROOT = '/var/www/fourweb/media/' settings.MEDIA_URL = 'http://fourweb.com/media/' it works!. Cheers Ronny El martes, 21 de mayo de 2013

Re: problem with ImageField does not show me the picture on a template

2013-05-22 Thread Tom Evans
On Wed, May 22, 2013 at 2:10 AM, Ronny Villarroel Mendoza wrote: > Hi all, > > I cant show the picture that I upload from the admin site. > > > settings.py: > > MEDIA_ROOT = '/var/www/fourweb/' > > > > models.py: > > class picture(models.Model): > producto_id = models.ForeignKey(producto) >

problem with ImageField: Errno 45 Operation not supported

2010-07-05 Thread pod_person
I'm new to Django and I've been struggling with getting ImageField to upload images. I have a very simple model that I want to use to store images: class WriteupImage(models.Model): writeup=models.ForeignKey(Writeup) image = models.ImageField(upload_to="writeup/photos/") I have a form wi

Re: Problem with ImageField and inline admin form

2008-09-03 Thread Ramin Miraftabi
The problem with this issue finally had nothing to do with the forms themselves, but the __unicode__ method of the Image-model. Older implementations of ImageField had a __unicode__ method of their own so def __unicode__(self): return self.file worked fine. Now this needs to be def __unicode

Re: Problem with ImageField and inline admin form

2008-09-02 Thread Aaron
Hi, I have similar models and wanted to do the same thing. Here's how I got my inline to work (using your provided models as an example). class Entry(models.Model): pub_date = models.DateTimeField('date published') created = models.DateTimeField(auto_now_add=True, editable=False) ed

Problem with ImageField and inline admin form

2008-08-29 Thread Ramin Miraftabi
Hi. I'm stumped and can't figure out a solution for the following: With the models: class Entry(models.Model): pub_date = models.DateTimeField('date published') created = models.DateTimeField(auto_now_add=True, editable=False) edited = models.DateTimeField(auto_now=True, editable=Fal

Re: problem with ImageField

2005-09-19 Thread Nebojša Đorđević - nesh
On 15-09-2005, at 4:38, Kenneth Gonsalves wrote: false alarm - i tried with a model where there was exactly one filed - the image field and it worked. The problem obviously lies in some other part of the model i was using. I was misled because the imagefield was being stored as a blank.

Re: problem with ImageField

2005-09-14 Thread Kenneth Gonsalves
On Wednesday 14 Sep 2005 4:25 pm, Matthew Marshall wrote: > On Wednesday 14 September 2005 08:25 am, lawgon wrote: > > > > File > > "/usr/local/lib/python2.4/site-packages/django/core/meta/fields.py" > >, line 320, in get_db_prep_save > > value = value.strftime('%Y-%m-%d') > > > > AttributeEr

Re: problem with ImageField

2005-09-14 Thread Matthew Marshall
On Wednesday 14 September 2005 08:25 am, lawgon wrote: > File > "/usr/local/lib/python2.4/site-packages/django/core/meta/fields.py", > line 320, in get_db_prep_save > value = value.strftime('%Y-%m-%d') > > AttributeError: 'str' object has no attribute 'strftime' > > i realise that this has so

problem with ImageField

2005-09-14 Thread lawgon
I am having a problem with ImageField saving. I am running admin from mod_python with apache2. I put an absolute path to the 'upload_to' option. When i press save, the imagefile gets uploaded to the directory specified in the 'upload_to' option, but this does not get saved i