Hello All,

I fixed my problem I needed to add a line like this to urls.py:
(r'^uploads/(?P<path>.*)$', 'django.views.static.serve', {
'document_root': 'c:/src/webcomic/uploads' } )

Thanks,
Craig Spry

On Mon, Dec 8, 2008 at 10:49 PM, Craig Spry <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> Just to add to what I've said below, when I point the browser at the
> image url like this:
> http://localhost:8000/uploads/comics/john7_web.png
>
> I get a 404.
>
> Craig
>
> On Mon, Dec 8, 2008 at 10:34 PM, Craig Spry <[EMAIL PROTECTED]> wrote:
>> Hello All,
>>
>> I have an image stored in a models.ImageField that looks like this:
>> comic = models.ImageField(upload_to='comics')
>>
>> and I have this in the settings.py
>> MEDIA_URL = 'http://localhost:8000/uploads/'
>>
>> and in the template I have this:
>> <img src="{{ comic.comic.url }}" alt="{{comic.name}}" />
>>
>> And all I see in the rendered page is the comic.name.  Is there
>> anything else I need to setup for this to work?
>>
>> Thanks,
>> Craig Spry
>>
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to