Tuesday, February 28, 2012

Re: Going crazy with WSGI

Thanks a lot, Javier. Things are a lot clearer now. Appreciate it.

On Feb 28, 7:46 pm, Javier Guerra Giraldez <jav...@guerrag.com> wrote:
> On Tue, Feb 28, 2012 at 5:58 AM, atlastorm <ays...@gmail.com> wrote:
> > Right now I'm practicing Django by running the Django server
> > (manage.py runserver) and everything works. Apache also runs but I
> > have no clue what its doing.
>
> nothing.
>
> the Django development server (the one that runs with the runserver
> command) is an intentionally-limited web server.  you don't need
> Apache for development.  but this server will absolutely not be
> appropriate for real world serving, no matter how light the load.
>
> > If I close the Django server, how do I
> > run my application? If I save a django.wsgifile in mysite/apache/
> > django.wsgiwill things happen automatically?
>
> you need the mod_wsgi docs for that.  the Django page about deployment
> in mod_wsgi should be enough to get you running in the simplest case.
>
> > When I practiced CGI with python, I had to import the cgi module and
> > use that to get the inputs from an html form. Do I have to do
> > something similar with Django?
>
> no.  Django manages everything betweenWSGIand your apps.  you
> shouldn't need any extra Python code besides what you run under the
> development server.   in fact, the development server usesWSGItoo,
> so if your code already runs there, it should also run on
> Apache/mod_wsgi once you get that configured.
>
> --
> Javier

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment