Re: Development server won't work from a shared web host

86 views
Skip to first unread message

Jonathan Baker

unread,
Sep 3, 2012, 4:10:18 PM9/3/12
to django...@googlegroups.com
In the 'Running the Development Server' section of this page in the tutorial it states that:
"Although this server is convenient for development, resist the temptation to use it in anything resembling a production environment. The development server can handle only a single request at a time reliably, and it has not gone through a security audit of any sort."

The 'runserver' command should only be used for local development. You need to configure your server to work with Django via wsgi (or a similar method).

Jonathan

On Mon, Sep 3, 2012 at 1:26 PM, ecs1749 <ecs...@gmail.com> wrote:
I have Django working from a shared host account (westhost).  I was able to follow all of the steps in tutorials 1 & 2 except the part on starting the development server.  Apparently westhost won't let you run that.  Without the development server, how do  I access the Django admin functions?

Thanks,

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



--
Jonathan D. Baker
Developer
http://jonathandbaker.com

ecs1749

unread,
Sep 3, 2012, 10:32:08 PM9/3/12
to django...@googlegroups.com
Thanks for the reply.  Yes, I saw that message.  I am a bit lost where to go next if I completely ignore that tutorial regarding doing admin from the development server (which I don't have).  Do I dive into tutorial   #3 and hope that it will pick up the admin stuff later when it gets to talk about wsgi?  Or is there a "here's what you do if you don't have a development server" tutorial somewhere?
Message has been deleted

Daniel Roseman

unread,
Sep 4, 2012, 2:13:53 AM9/4/12
to django...@googlegroups.com
On Tuesday, 4 September 2012 03:32:08 UTC+1, ecs1749 wrote:
Thanks for the reply.  Yes, I saw that message.  I am a bit lost where to go next if I completely ignore that tutorial regarding doing admin from the development server (which I don't have).  Do I dive into tutorial   #3 and hope that it will pick up the admin stuff later when it gets to talk about wsgi?  Or is there a "here's what you do if you don't have a development server" tutorial somewhere?


You should not be doing the tutorial - or any development - on your server. Install Django locally and do it there, then deploy when you are ready and not before.

However, you are wrong to assume that the admin console has anything to do with the development server - it works just fine with any server.
--
DR.

ecs1749

unread,
Sep 4, 2012, 12:03:44 PM9/4/12
to django...@googlegroups.com
I don't have a local machine I can use to learn Django - just a personal acct from a shared host.  The question I kept asking was:  How do I get into admin and follow the tutorial without the development server because the tutorial doesn't tell me that.

Regards,

Marcin Tustin

unread,
Sep 4, 2012, 12:19:14 PM9/4/12
to django...@googlegroups.com
You don't have a computer that you can develop on at all? How are you writing this email? Developing over ssh is going to be a huge pain.

Now, you *maybe* can use the runserver command - if you do add the --help switch it will tell you how to run it to bind to a particular interface and port. It maybe that you can bind it to a port on the localhost interface (and then tunnel that over ssh), or you may be able to have your host allocate you specific ports which you can use to run any kind of web server you like. 

While runserver shouldn't be used for production, I have used it to diagnose specific problems in the production environment, which inevitably will differ from development when using a shared host. This is, of course, fairly insecure, and could even be illegal depending on your data protection obligations. 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/UhMFGZB6YS0J.

To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Marcin Tustin
Tel: +44 (0) 7773 787 105 (UK)
       +1  917 553 3974 (US)


ecs1749

unread,
Sep 6, 2012, 12:19:29 AM9/6/12
to django...@googlegroups.com
Ok, ok.  I now have a Ubuntu/server with a Ubuntu desktop running using oracle vm virtualbox.   I know almost nothing about Linux.  I don't even know how to ssh to this beast sitting in front of me.  I  hope this is a start...

Demian Brecht

unread,
Sep 6, 2012, 9:58:13 AM9/6/12
to django...@googlegroups.com
You *can* install Django on Linux, Mac or Windows. Choose the
environment that you're most accustomed to if you're just trying to
get things done. However, if you want to learn Linux at the same time
(at least, bits of it), then I fully endorse going down that path.

ecs1749

unread,
Sep 6, 2012, 1:23:07 PM9/6/12
to django...@googlegroups.com
Thanks.  I might as well bite bits of it.  It's tough going because there are so many dependencies.  It's hard to gather all of the right packages just to get through the Django tutorial.

Kurtis Mullins

unread,
Sep 6, 2012, 2:21:11 PM9/6/12
to django...@googlegroups.com
Hey,

All you should need to get through the Django Tutorial is Python and Django. During development you can use SQLite which is built in and doesn't need any third-party libraries. Good luck!

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/1pD4k3PdhtEJ.

ecs1749

unread,
Sep 6, 2012, 11:08:56 PM9/6/12
to django...@googlegroups.com
Well, that's almost true :-)

Granted - it's a lot easier so far but I had to track down several things (and a whole lot of "here's how" tips) that were taken for granted (like pip which require easy_install.... so on and so forth). 

In retrospect, I recommend future newbee to take this route: start with Oracle's VirtualBox and build a Ubuntu virtual machine,   Enable the desktop, mySQL, and SSLServer.  Get easy_install which comes with pip.  Install Django via pip, add Python-mySQL and Mako - then off you go.  It's a whole lot easier this way. 

graeme

unread,
Sep 8, 2012, 1:30:19 AM9/8/12
to django...@googlegroups.com


On Tuesday, September 4, 2012 11:43:53 AM UTC+5:30, Daniel Roseman wrote:
On Tuesday, 4 September 2012 03:32:08 UTC+1, ecs1749 wrote:
Thanks for the reply.  Yes, I saw that message.  I am a bit lost where to go next if I completely ignore that tutorial regarding doing admin from the development server (which I don't have).  Do I dive into tutorial   #3 and hope that it will pick up the admin stuff later when it gets to talk about wsgi?  Or is there a "here's what you do if you don't have a development server" tutorial somewhere?


You should not be doing the tutorial - or any development - on your server. Install Django locally and do it there, then deploy when you are ready and not before.

I have used the development server to run a test site so the client could see the site easily. It sat behind a real webserver: if you do this you can tighten security a bit (e.g. use http authentication to limit access).

graeme

unread,
Sep 8, 2012, 1:55:36 AM9/8/12
to django...@googlegroups.com


On Friday, September 7, 2012 8:38:56 AM UTC+5:30, ecs1749 wrote:
Well, that's almost true :-)

Granted - it's a lot easier so far but I had to track down several things (and a whole lot of "here's how" tips) that were taken for granted (like pip which require easy_install.... so on and so forth). 

In retrospect, I recommend future newbee to take this route: start with Oracle's VirtualBox and build a Ubuntu virtual machine,   Enable the desktop, mySQL, and SSLServer.  Get easy_install which comes with pip.  Install Django via pip, add Python-mySQL and Mako - then off you go.  It's a whole lot easier this way. 

Easier still: install  virtualenv (in the Ubuntu repos), which comes with pip and use sqlite (which should be already installed). I have not had any problems so far developing on SQLite and eventually deploying using Postgres.

Why Mako? As a personal preference it is fine, but why general advice for newbies? Many people are happy with Django templates - although I far prefer Jinja which had the advantages without some of the more annoying restrictions.

Javier Guerra Giraldez

unread,
Sep 8, 2012, 2:43:10 PM9/8/12
to django...@googlegroups.com
On Sat, Sep 8, 2012 at 12:55 AM, graeme <graeme....@gmail.com> wrote:
> Why Mako? As a personal preference it is fine, but why general advice for
> newbies? Many people are happy with Django templates - although I far prefer
> Jinja which had the advantages without some of the more annoying
> restrictions.

after a quick look at Mako, it's similar enough to PHP (embedding a
full language in the template) to be familiar to many newcomers....
for the wrong reasons.

there's a reason why the Django templates (and Jinja too, i believe)
make a conscious effort not to be Turing-complete.

--
Javier
Reply all
Reply to author
Forward
0 new messages