Yay, big thanks. It works now.

On 9 Dez., 07:30, Karen Tracey <kmtra...@gmail.com> wrote:
> On Tue, Dec 8, 2009 at 4:42 PM, Lukas <lukas.so...@gmail.com> wrote:
> > Hi everyone,
>
> > i've a problem viewing uploaded files via the admin interface. When I
> > try to view the file, everything I get is a ValueError exception:
> > invalid literal for int() with base 10...
> > I know it goes wrong, when your MEDIA_URL is not set correctly.
>
> > The link to the file in the admin interface is:
> >http://localhost:8000/admin/myModel/attachment/1/files/my-file.pdf/
>
> > should be:
> >http://localhost:8000/media/files/my-file.pdf/<- this one works
>
> > Here's are my related code:
>
> > settings.py
> > [...]
> > MEDIA_ROOT = os.path.join(PROJECT_DIR,'media')
> > MEDIA_URL = 'localhost:8000/media/'
>
> Get rid of the localhost:8000 here.  Make MEDIA_URL just '/media/'.
>
> Karen

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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