Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Recommendations for having a static index page
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ellison Marks  
View profile  
 More options Nov 14 2012, 4:28 pm
From: Ellison Marks <gty...@gmail.com>
Date: Wed, 14 Nov 2012 13:28:59 -0800 (PST)
Local: Wed, Nov 14 2012 4:28 pm
Subject: Recommendations for having a static index page

So I've been learning pyramid, and I'm not sure of the best way to serve a
static page from root. I've got a few ideas, but would appreciate more
experienced input.

   1. Use a template. This strikes me as a pretty bad idea right off.
   2. Have the main page redirect to a static page. Not entirely desirable,
   but it would work well enough, I think.
   3. Use paster's urlmap to serve the static page from root and the app
   from somewhere below that. Seems slick, but maybe limiting on how I could
   construct urls. Everything would have to be below /appname, rather than
   just /. Unless there's some way I could map different parts of the app to
   different parts of the urlmap. @_@
   4. Have the web server handle it. Sort of another variation on 3, with
   similar limitations it seems.

For reference, I'm using the zodb scaffold. Thanks in advance.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jpe...@ykksnap-america.com  
View profile  
 More options Nov 14 2012, 4:44 pm
From: JPe...@ykksnap-america.com
Date: Wed, 14 Nov 2012 16:20:08 -0500
Local: Wed, Nov 14 2012 4:20 pm
Subject: Re: Recommendations for having a static index page

In production, most people use a static webserver
for this.  Read  nginx or apache2.  Typically you
might serve all content with the static server and
reverse proxy to pyramid for the dynamic content.

You can also look at uwsgi or mod_python as the pyramid
WSGI server, but it is usually easier to set up reverse
proxy.  Just don't get confused and try to set up both.

jim penny

pylons-discuss@googlegroups.com wrote on 11/14/2012 04:28:59 PM:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jpe...@ykksnap-america.com  
View profile  
 More options Nov 14 2012, 4:50 pm
From: JPe...@ykksnap-america.com
Date: Wed, 14 Nov 2012 16:26:24 -0500
Local: Wed, Nov 14 2012 4:26 pm
Subject: Re: Recommendations for having a static index page

On second reading, I am not sure that what I
wrote makes sense.  I think you want something
a bit different.  Are your trying to automatically
generate the index page?  How often do you expect
the index page to change?

[In general, pyramid does not do a great job of
handling purely static data.  It works, and it is
fine for debugging, but it is relatively slow and
may require more memory than systems tailored for
static data.]

jim penny

pylons-discuss@googlegroups.com wrote on 11/14/2012 04:20:08 PM:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ellison Marks  
View profile  
 More options Nov 14 2012, 4:57 pm
From: Ellison Marks <gty...@gmail.com>
Date: Wed, 14 Nov 2012 13:57:53 -0800 (PST)
Local: Wed, Nov 14 2012 4:57 pm
Subject: Re: Recommendations for having a static index page

Thanks for the quick reply.

No, I think you had it right the first time, the index page will probably
change almost never. Out of curiosity, would it be a good idea to mock up
some sort of index page and still use waitress for development, or go to an
actual web server now?

On Wednesday, November 14, 2012 1:50:26 PM UTC-8,


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Malthe Borch  
View profile  
 More options Nov 14 2012, 5:05 pm
From: Malthe Borch <mbo...@gmail.com>
Date: Wed, 14 Nov 2012 23:04:54 +0100
Local: Wed, Nov 14 2012 5:04 pm
Subject: Re: Recommendations for having a static index page
On 14 November 2012 22:28, Ellison Marks <gty...@gmail.com> wrote:

> Use a template. This strikes me as a pretty bad idea right off.

The `pyramid_skins` package provides a small "framework" that
addresses this (and other) need:

    http://packages.python.org/pyramid_skins/

\malthe


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jpe...@ykksnap-america.com  
View profile  
 More options Nov 14 2012, 5:20 pm
From: JPe...@ykksnap-america.com
Date: Wed, 14 Nov 2012 16:56:45 -0500
Local: Wed, Nov 14 2012 4:56 pm
Subject: Re: Recommendations for having a static index page

I would just use waitress until things are settled
out.

jim

Ellison Marks <gty...@gmail.com>
Sent by: pylons-discuss@googlegroups.com
11/14/2012 04:57 PM
Please respond to
pylons-discuss@googlegroups.com

To
pylons-discuss@googlegroups.com
cc

Subject
Re: Recommendations for having a static index page

Thanks for the quick reply.

No, I think you had it right the first time, the index page will probably
change almost never. Out of curiosity, would it be a good idea to mock up
some sort of index page and still use waitress for development, or go to
an actual web server now?

On Wednesday, November 14, 2012 1:50:26 PM UTC-8,

jpe...@ykksnap-america.com wrote:

On second reading, I am not sure that what I
wrote makes sense.  I think you want something
a bit different.  Are your trying to automatically
generate the index page?  How often do you expect
the index page to change?

[In general, pyramid does not do a great job of
handling purely static data.  It works, and it is
fine for debugging, but it is relatively slow and
may require more memory than systems tailored for
static data.]

jim penny

pylons-...@googlegroups.com wrote on 11/14/2012 04:20:08 PM:

--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/pylons-discuss/-/HReaqwx9wnYJ.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to
pylons-discuss+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Vanasco  
View profile  
 More options Nov 14 2012, 11:34 pm
From: Jonathan Vanasco <jonat...@findmeon.com>
Date: Wed, 14 Nov 2012 20:34:10 -0800 (PST)
Local: Wed, Nov 14 2012 11:34 pm
Subject: Re: Recommendations for having a static index page

for a current project:

DEV
nginx - port 80
proxy pass to pserve ( waitress ) - port 5020

PROD/STAGING
nginx - port 80
uwsgi integration to pyramid

i decided that using nginx on dev was just a lot easier for me
a- i just launch it once, and its no real drain on my mac, so i only have
to auth to bind to port 80/443 once
b- it makes writing/debugging http/https stuff so much simpler.
c- it makes dealing with static/nonstatic stuff simpler too.

of course i need different nginx setups on each machine as the directories
and deployments are different, but developing against it has made that very
very simple.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »