Hi...all,
I am using cherrypy more than 2 months, now i am having strange
doubt, is it necessary we should use def index(), for our index
page....(exact name index(), we can't use other names?)?
One more is i want to call
directly a html file, that is navigation from one html file to another
html file, is it possible?(i want to call a static html file, from my
another html file) instead of writing a method to call a static
file...
please help me to find out....Thanks in
advance.....
> Hi...all,
> I am using cherrypy more than 2 months, now i am having strange
> doubt, is it necessary we should use def index(), for our index
> page....(exact name index(), we can't use other names?)?
> One more is i want to call
> directly a html file, that is navigation from one html file to another
> html file, is it possible?(i want to call a static html file, from my
> another html file) instead of writing a method to call a static
> file...
> please help me to find out....Thanks in
> advance.....
> -- > 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 http://groups.google.com/group/cherrypy-users?hl=en.
ram_ganeshu wrote:
> I am using cherrypy more than 2 months, now i am having strange
> doubt, is it necessary we should use def index(), for our index
> page....(exact name index(), we can't use other names?)?
Why would you want to?
Here's the issue. Web requests need to end up with files, not
directories. When a web request arrives for a directory (like
"http://www.website.com/" or "http://www.website.com/folder/"), Apache
rewrites that to refer to "index.html". (The exact list is in your
Apache configuration files.) That's where this convention comes from.
-- Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
On Mon, May 14, 2012 at 11:49 PM, Tim Roberts <t...@probo.com> wrote:
> ram_ganeshu wrote:
> > I am using cherrypy more than 2 months, now i am having strange
> > doubt, is it necessary we should use def index(), for our index
> > page....(exact name index(), we can't use other names?)?
> Why would you want to?
> Here's the issue. Web requests need to end up with files, not
> directories. When a web request arrives for a directory (like
> "http://www.website.com/" or "http://www.website.com/folder/"), Apache
> rewrites that to refer to "index.html". (The exact list is in your
> Apache configuration files.) That's where this convention comes from.
> --
> Tim Roberts, t...@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
> http://groups.google.com/group/cherrypy-users?hl=en.
-----Original Message-----
From: cherrypy-users@googlegroups.com on behalf of GaneshPandi
Sent: Tue 15/05/2012 06:10
To: cherrypy-users@googlegroups.com
Subject: Re: [cherrypy-users] doubts on cherrypy
why...in the sense, my doubt is that...so it is fixed? we have to to use
index () only, for index page...
On Mon, May 14, 2012 at 11:49 PM, Tim Roberts <t...@probo.com> wrote:
> ram_ganeshu wrote:
> > I am using cherrypy more than 2 months, now i am having strange
> > doubt, is it necessary we should use def index(), for our index
> > page....(exact name index(), we can't use other names?)?
> Why would you want to?
> Here's the issue. Web requests need to end up with files, not
> directories. When a web request arrives for a directory (like
> "http://www.website.com/" or "http://www.website.com/folder/"), Apache
> rewrites that to refer to "index.html". (The exact list is in your
> Apache configuration files.) That's where this convention comes from.
> --
> Tim Roberts, t...@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
> http://groups.google.com/group/cherrypy-users?hl=en.
-- ---G.GaneshPandi---
-- 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 http://groups.google.com/group/cherrypy-users?hl=en.
GaneshPandi wrote:
> why...in the sense, my doubt is that...so it is fixed? we have to to
> use index () only, for index page...
I'm sorry, I don't understand the question.
"index" is just a convention. If you are using Apache as a front-end,
you can change the name of the default page using the DirectoryIndex
directive in your .htaccess file.
Also, remember that you aren't REQUIRED to support an index page. If
you know that every request to your CherryPy site will include a page
name, then you don't need index(). It all depends on what you need to
provide to your users.
-- Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.