|
List Info
Thread: newbie, wants to load and return static html page, wants to dynamically load and pr
|
|
| newbie, wants to load and return static
html page, wants to dynamically load and
pr |
  United States |
2007-04-09 04:26:08 |
As per the subject line, I want to be able to load files
from the file
system.
It seems from the tutorial that the way to do that is to
have the
static files in the config file, but what if I want to do
this for my
index even?
In the tutorial on errors it shows a method that shows how
to do
custom errors:
import os
localDir = os.path.dirname(__file__)
curpath = os.path.normpath(os.path.join(os.getcwd(),
localDir))
cherrypy.config.update({'error_page.403' :
os.path.join(curpath,
"custom_error.html")})
the cherrypy.config.update displeases me, no doubt for no
good reason
but it just seems like this is not the way I want to do it.
I am going to be running Cherrypy in production behind
ModRewrite, but
in development I want it like this so I can distribute it to
some of
the people I am working with that know a little bit of Html
but not
python so that they can do relatively easy updates that I
can then
take and edit.
Finally I want to be able to do something like this:
def gameX():
getpage(game, player)
where game loads in a script dynamically dependent on the
value of
player and executes it.
This is of course probably not the way I will actually want
to do the
application, this is just the capability I will want in
doing the
application.
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 h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: newbie, wants to load and return
static html page, wants to dynamically
load an |

|
2007-04-09 07:52:52 |
On 4/9/07, pantagruel <rasmussen.bryan gmail.com> wrote:
[snip]
> I am going to be running Cherrypy in production behind
ModRewrite, but
> in development I want it like this so I can distribute
it to some of
> the people I am working with that know a little bit of
Html but not
> python so that they can do relatively easy updates that
I can then
> take and edit.
>
> Finally I want to be able to do something like this:
>
> def gameX():
> getpage(game, player)
>
> where game loads in a script dynamically dependent on
the value of
> player and executes it.
For mixing static and dynamic content, see:
http://tools.cherrypy.org/wiki/MixingStaticAndDynami
cContent
Also, rest assured that configuration is one of the most
flexible and
powerful parts of CherryPy 3. See:
http://www.che
rrypy.org/wiki/ConfigAPI
Christian
http://www.dowski.com
--~--~---------~--~----~------------~-------~--~----~
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 h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: newbie, wants to load and return
static html page, wants to dynamically
load an |
  United States |
2007-04-13 10:47:51 |
Hi Christian,
Thanks, and sorry for not responding on this sooner (am on
vacation)
but when I tried the sample code for
MixingStaticAndDynamicContent I
got the following error:
AttributeError: 'module' object has no attribute
'quickstart'
Cheers,
Bryan Rasmussen
On Apr 9, 2:52 pm, "Christian Wyglendowski"
<christ... dowski.com>
wrote:
> On 4/9/07, pantagruel <rasmussen.br... gmail.com> wrote:
> [snip]
>
> > I am going to be running Cherrypy in production
behind ModRewrite, but
> > in development I want it like this so I can
distribute it to some of
> > the people I am working with that know a little
bit of Html but not
> > python so that they can do relatively easy updates
that I can then
> > take and edit.
>
> > Finally I want to be able to do something like
this:
>
> > def gameX():
> > getpage(game, player)
>
> > where game loads in a script dynamically dependent
on the value of
> > player and executes it.
>
> For mixing static and dynamic content, see:http://tools.cherrypy.org/wiki/MixingStaticAndDynami
cContent
>
> Also, rest assured that configuration is one of the
most flexible and
> powerful parts of CherryPy 3. See:http://www.che
rrypy.org/wiki/ConfigAPI
>
> Christianhttp://www.dowski.com
--~--~---------~--~----~------------~-------~--~----~
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 h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
| Re: newbie, wants to load and return
static html page, wants to dynamically
load an |

|
2007-04-13 11:00:59 |
On 4/13/07, pantagruel <rasmussen.bryan gmail.com> wrote:
> Thanks, and sorry for not responding on this sooner (am
on vacation)
> but when I tried the sample code for
MixingStaticAndDynamicContent I
> got the following error:
>
> AttributeError: 'module' object has no attribute
'quickstart'
Oh, what version of CherryPy are you using? The example is
for 3.0.x.
Sounds like you have 2.x.
Christian
--~--~---------~--~----~------------~-------~--~----~
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 h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|
|
[1-4]
|
|