Static content example

3 views
Skip to first unread message

Lethalman

unread,
Oct 6, 2005, 4:14:42 AM10/6/05
to TurboGears
I'm not able to use static contents. I just started a project then
inserted an image in static/images. I tried to access it by
/static/images/image.png and /images/image.png. It gives me two
different errors but no image has been shown

Lethalman

unread,
Oct 6, 2005, 8:53:54 AM10/6/05
to TurboGears
I simply performed these actions:
1) tg-admin quickstart
2) Put test.png into static/images
3) Access the image by browser for /static/images/test.png

This is the error:

Traceback (most recent call last):
File "/usr/local/lib/python2.4/site-packages/CherryPy-2.1.0_betadev-py2.4.egg/cherrypy/_cphttptools.py",
line 274, in run
applyFilters('beforeMain')
File "/usr/local/lib/python2.4/site-packages/CherryPy-2.1.0_betadev-py2.4.egg/cherrypy/_cphttptools.py",
line 655, in applyFilters
method()
File "/usr/local/lib/python2.4/site-packages/CherryPy-2.1.0_betadev-py2.4.egg/cherrypy/lib/filter/staticfilter.py",
line 68, in beforeMain
cptools.serveFile(filename)
File "/usr/local/lib/python2.4/site-packages/CherryPy-2.1.0_betadev-py2.4.egg/cherrypy/lib/cptools.py",
line 237, in serveFile
raise cherrypy.NotFound(cherrypy.request.path)
NotFound: /static/images/avatar.png

--
www.italianpug.org - Italian Python User Group Founder

Elvelind Grandin

unread,
Oct 6, 2005, 9:01:53 AM10/6/05
to turbo...@googlegroups.com
which version? from svn?
--
cheers
elvelind grandin

Lethalman

unread,
Oct 6, 2005, 9:05:01 AM10/6/05
to turbo...@googlegroups.com
On 10/6/05, Elvelind Grandin <elve...@gmail.com> wrote:
>
> which version? from svn?
>

I checked out it right now and i've done everything from scratch.

Elvelind Grandin

unread,
Oct 6, 2005, 9:11:41 AM10/6/05
to turbo...@googlegroups.com
hm. strange. and you put the image in the static dir that tg-admin created?

On 10/6/05, Lethalman <letha...@gmail.com> wrote:
>
--
cheers
elvelind grandin

Lethalman

unread,
Oct 6, 2005, 9:20:37 AM10/6/05
to turbo...@googlegroups.com
yes i put it in static/images how should i access it by web? Maybe i'm
wrong on that...

Elvelind Grandin

unread,
Oct 6, 2005, 9:26:35 AM10/6/05
to turbo...@googlegroups.com
just localhost/static/images/image.png -should- work

On 10/6/05, Lethalman <letha...@gmail.com> wrote:
>
> yes i put it in static/images how should i access it by web? Maybe i'm
> wrong on that...
>
> On 10/6/05, Elvelind Grandin <elve...@gmail.com> wrote:
> >
> > hm. strange. and you put the image in the static dir that tg-admin created?
> >
> > On 10/6/05, Lethalman <letha...@gmail.com> wrote:
> > >
> > > On 10/6/05, Elvelind Grandin <elve...@gmail.com> wrote:
> > > >
> > > > which version? from svn?
> > > >
> > >
> > > I checked out it right now and i've done everything from scratch.
> > >
> > > --
> > > www.italianpug.org - Italian Python User Group Founder
> > >
> >
> >
> > --
> > cheers
> > elvelind grandin
> >
>
>
> --
> www.italianpug.org - Italian Python User Group Founder
>


--
cheers
elvelind grandin

Lethalman

unread,
Oct 6, 2005, 9:30:48 AM10/6/05
to turbo...@googlegroups.com
it doesn't work :(

Elvelind Grandin

unread,
Oct 6, 2005, 9:35:37 AM10/6/05
to turbo...@googlegroups.com
You dont have the time/possiblitie to come on to the irc channel do you?
--
cheers
elvelind grandin
Reply all
Reply to author
Forward
0 new messages