|
|
| Displaying Image in cherrypy...problems
continue..sorry :-( |

|
2006-10-10 20:28:49 |
Hello,
I am still having problems displaying images :-(
I have created a static directory inside the tutorial dir
where i've
put the image
[global]
server.socket_port = 8080
server.thread_pool = 10
[/]
tools.staticdir.root="/usr/local/CherryPy-3.0.0beta2/ch
errypy/tutorial"
[/static]
tools.staticdir.on = True
tools.staticdir.dir = "static"
-----------------------------------------------------------
import cherrypy
class HelloWorld:
def index(self):
return "<img src='/cplogo.jpg' />"
index.exposed = True
if __name__ == '__main__':
import os.path
tutconf = os.path.join(os.path.dirname(__file__),
'tutorial.conf')
cherrypy.config.update(tutconf)
cherrypy.quickstart(HelloWorld())
Thanks for your help
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at ht
tp://groups-beta.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Displaying Image in cherrypy...problems
continue..sorry :-( |

|
2006-10-10 21:00:36 |
salvatore wrote:
>Hello,
>
>I am still having problems displaying images :-(
>I have created a static directory inside the tutorial
dir where i've
>put the image
>
>
>[global]
>server.socket_port = 8080
>server.thread_pool = 10
>
>[/]
>tools.staticdir.root="/usr/local/CherryPy-3.0.0beta
2/cherrypy/tutorial"
>
>[/static]
>tools.staticdir.on = True
>tools.staticdir.dir = "static"
>
>--------------------------------------------------------
---
>
>
>import cherrypy
>
>class HelloWorld:
> def index(self):
> return "<img src='/cplogo.jpg'
/>"
>
>
Since your static directory is called "/static",
surely you meant to type:
return "<img src='/static/cplogo.jpg'
/>"
--
Tim Roberts, timr probo.com
Providenza & Boekelheide, Inc.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at ht
tp://groups-beta.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Displaying Image in cherrypy...problems
continue..sorry :-( |

|
2006-10-10 21:07:35 |
Thanks for tour response Tim, but i have tried it without
success:-(
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at ht
tp://groups-beta.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Displaying Image in cherrypy...problems
continue..sorry :-( |

|
2006-10-10 21:13:29 |
Thanks for tour response Tim, but i have tried it without
success:-(
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at ht
tp://groups-beta.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Displaying Image in cherrypy...problems
continue..sorry :-( |

|
2006-10-15 14:31:43 |
hi, today, I still met this problem.
however, I found the answer, use following conf
[global]
server.socketPort = 8080
server.threadPool = 30
server.environment = "production"
static_filter.root = "/home/frank/myweb"
[/css]
static_filter.on = True
static_filter.dir = "css"
[/js]
static_filter.on = True
static_filter.dir = "js"
so, I can use "css/style.css" and
"js/my.js" in page now.
you can found this at:
http:
//docs.cherrypy.org/serving-static-content
I just answer another question about this at python.cn, I
think
cherrypy should update the document.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at ht
tp://groups-beta.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Displaying Image in cherrypy...problems
continue..sorry :-( |

|
2006-10-16 11:21:39 |
Than's Frank
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at ht
tp://groups-beta.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Displaying Image in cherrypy...problems
continue..sorry :-( |

|
2006-10-17 02:32:47 |
hi, salvatore:
I made a mistake that my answer only can work with cp2, cp3
need use
your ways, however, you ways can't work, I failed either.
anyone can help us?
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at ht
tp://groups-beta.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Displaying Image in cherrypy...problems
continue..sorry :-( |

|
2006-10-17 09:03:09 |
I'am glad to see i am not alone in the dark
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at ht
tp://groups-beta.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Displaying Image in cherrypy...problems
continue..sorry :-( |

|
2006-10-17 09:18:05 |
salvatore wrote:
> I'am glad to see i am not alone in the dark
>
Would you mind pasting the error you get or what happens.
Also paste
your code and directory layout.
Thanks,
- Sylvain
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at ht
tp://groups-beta.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Displaying Image in cherrypy...problems
continue..sorry :-( |

|
2006-10-22 15:22:18 |
Merci Sylvain , I'm
going to try Fumanchus's solution
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at ht
tp://groups-beta.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|
|