I'm coming into the Python world from a PHP background. I'm trying to get a working Pyramid application working on my own machine, and I've almost made it. I have nginx and uWSGI running, and can call a Python script from the browser successfully. However, lots of research, reading documentation, and even reading through the "starter project" code has failed to make it clear to me how to connect Pyramid to wsgi. The script looks like this:
So a request to http://localhost/ in the browser gives me "Hello Universe!". How can I modify my script/uWSGI configuration to run Pyramid instead? Thanks for your help.
> I'm coming into the Python world from a PHP background. I'm trying to get
> a working Pyramid application working on my own machine, and I've almost
> made it. I have nginx and uWSGI running, and can call a Python script from
> the browser successfully. However, lots of research, reading
> documentation, and even reading through the "starter project" code has
> failed to make it clear to me how to connect Pyramid to wsgi. The script
> looks like this:
> So a request to http://localhost/ in the browser gives me "Hello
> Universe!". How can I modify my script/uWSGI configuration to run Pyramid
> instead? Thanks for your help.
> --
> 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/-/xW1HspiacSYJ.
> 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.
Alternatively, you can combine the ``ini`` and ``paste`` config action, and remove the need to reference your .ini file twice.
$ uwsgi --ini-paste development.ini
The features above support having combined .ini files, or a single .ini files that configures multiple apps.
ps. You don't need that ``callable`` line because uwsgi reads your paste .ini file and derives from ``use = egg:MyProject``, which is short-hand for ``egg:MyProject#main`` - ``main`` being the callable in your project's ``__init__.py``. I write mine in full as I prefer to have as little implied config as possible.
> In your uwsgi ini, 'file' will refer to 'pyramid.wsgi' in the tutorial above, since it will have the wsgi application (callable = 'application')
> Hope that helps!
> Craig Younkins
> On Sat, Jul 28, 2012 at 11:08 PM, Jonah Dahlquist <jonahbro...@gmail.com> wrote:
> Hello, world!
> I'm coming into the Python world from a PHP background. I'm trying to get a working Pyramid application working on my own machine, and I've almost made it. I have nginx and uWSGI running, and can call a Python script from the browser successfully. However, lots of research, reading documentation, and even reading through the "starter project" code has failed to make it clear to me how to connect Pyramid to wsgi. The script looks like this:
> So a request to http://localhost/ in the browser gives me "Hello Universe!". How can I modify my script/uWSGI configuration to run Pyramid instead? Thanks for your help.
> -- > 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/-/xW1HspiacSYJ.
> 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 received this message because you are subscribed to the Google Groups "pylons-discuss" group.
> 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.
> In your uwsgi ini, 'file' will refer to 'pyramid.wsgi' in the tutorial > above, since it will have the wsgi application (callable = 'application')
> Hope that helps!
> Craig Younkins
> On Sat, Jul 28, 2012 at 11:08 PM, Jonah Dahlquist <jonah...@gmail.com<javascript:> > > wrote:
>> Hello, world!
>> I'm coming into the Python world from a PHP background. I'm trying to >> get a working Pyramid application working on my own machine, and I've >> almost made it. I have nginx and uWSGI running, and can call a Python >> script from the browser successfully. However, lots of research, reading >> documentation, and even reading through the "starter project" code has >> failed to make it clear to me how to connect Pyramid to wsgi. The script >> looks like this:
>> So a request to http://localhost/ in the browser gives me "Hello >> Universe!". How can I modify my script/uWSGI configuration to run Pyramid >> instead? Thanks for your help.
>> -- >> 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/-/xW1HspiacSYJ. >> To post to this group, send email to pylons-...@googlegroups.com<javascript:> >> . >> To unsubscribe from this group, send email to >> pylons-discus...@googlegroups.com <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/pylons-discuss?hl=en.
> Alternatively, you can combine the ``ini`` and ``paste`` config action, > and remove the need to reference your .ini file twice.
> $ uwsgi --ini-paste development.ini
> The features above support having combined .ini files, or a single .ini > files that configures multiple apps.
> ps. You don't need that ``callable`` line because uwsgi reads your paste > .ini file and derives from ``use = egg:MyProject``, which is short-hand for > ``egg:MyProject#main`` - ``main`` being the callable in your project's > ``__init__.py``. I write mine in full as I prefer to have as little implied > config as possible.
> > In your uwsgi ini, 'file' will refer to 'pyramid.wsgi' in the tutorial > above, since it will have the wsgi application (callable = 'application')
> > Hope that helps!
> > Craig Younkins
> > On Sat, Jul 28, 2012 at 11:08 PM, Jonah Dahlquist <jonah...@gmail.com<javascript:>> > wrote: > > Hello, world!
> > I'm coming into the Python world from a PHP background. I'm trying to > get a working Pyramid application working on my own machine, and I've > almost made it. I have nginx and uWSGI running, and can call a Python > script from the browser successfully. However, lots of research, reading > documentation, and even reading through the "starter project" code has > failed to make it clear to me how to connect Pyramid to wsgi. The script > looks like this:
> > So a request to http://localhost/ in the browser gives me "Hello > Universe!". How can I modify my script/uWSGI configuration to run Pyramid > instead? Thanks for your help.
> > -- > > 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/-/xW1HspiacSYJ. > > To post to this group, send email to pylons-...@googlegroups.com<javascript:>.
> > -- > > You received this message because you are subscribed to the Google > Groups "pylons-discuss" group. > > To post to this group, send email to pylons-...@googlegroups.com<javascript:>.