Comments on: How-To: Django on NearlyFreeSpeech.NET https://blog.nearlyfreespeech.net/2014/11/17/how-to-django-on-nearlyfreespeech-net/ A blog from the staff at NearlyFreeSpeech.NET. Wed, 14 Jan 2015 16:29:30 +0000 hourly 1 By: nipponese https://blog.nearlyfreespeech.net/2014/11/17/how-to-django-on-nearlyfreespeech-net/#comment-29147 Wed, 14 Jan 2015 16:29:30 +0000 https://blog.nearlyfreespeech.net/?p=464#comment-29147 Very much looking forward to the Ruby on Rails article mentioned in the first paragraph.

]]>
By: jdw https://blog.nearlyfreespeech.net/2014/11/17/how-to-django-on-nearlyfreespeech-net/#comment-29014 Tue, 09 Dec 2014 03:03:39 +0000 https://blog.nearlyfreespeech.net/?p=464#comment-29014 In reply to Jayshua.

I don’t know if anyone has tried Discourse; “a bit more hardware” would probably translate into “a bit more cost.”

Ruby 2 has compatibility issues and therefore is only available in the black realm, alongside its ne’er-do-well buddy, Python 3.

-jdw

]]>
By: Jayshua https://blog.nearlyfreespeech.net/2014/11/17/how-to-django-on-nearlyfreespeech-net/#comment-29013 Tue, 09 Dec 2014 01:11:51 +0000 https://blog.nearlyfreespeech.net/?p=464#comment-29013 First, this is great! I’m sure I will be using this at some point. Second, any comment on running Discourse? I’ve noticed it tends to require a bit more hardware than most other software. And it needs at least Ruby 2 (I believe you are on Ruby 1.9?) Thanks again, you guys are awesome!

]]>
By: BobC https://blog.nearlyfreespeech.net/2014/11/17/how-to-django-on-nearlyfreespeech-net/#comment-29012 Mon, 08 Dec 2014 18:09:38 +0000 https://blog.nearlyfreespeech.net/?p=464#comment-29012 I want to take a look at this and couple it with the offer of Postgres I saw in the original announcement of persistent processes.

However often it gets said, it’s not enough: you guys bleedin’ rock. I can’t wait to give this a go.

]]>
By: jdw https://blog.nearlyfreespeech.net/2014/11/17/how-to-django-on-nearlyfreespeech-net/#comment-28440 Mon, 24 Nov 2014 00:44:54 +0000 https://blog.nearlyfreespeech.net/?p=464#comment-28440 In reply to jdw.

Here’s an example of how difficult it isn’t to switch from the development server to gunicorn, taken almost straight from the Django documentation. (They use a different name for their sample app.)

In the run script shown in this article, change the line:

exec python manage.py runserver

to:

exec gunicorn helloworld.wsgi

And, if the development server is already running, send your daemon a TERM from our UI to restart using the new one. That’s pretty much it.

Of course, there are all sorts of Django and gunicorn settings you can tweak (notably the number of workers/threads for gunicorn and the Debug setting for Django). It’s way beyond the scope of this article to get into that, for the same reason we don’t get into creating applications and all the stuff that comes after getting the server up and running.

(gunicorn and uwsgi are present in the same realms as Django.)

-jdw

]]>
By: jdw https://blog.nearlyfreespeech.net/2014/11/17/how-to-django-on-nearlyfreespeech-net/#comment-28417 Sun, 23 Nov 2014 23:45:09 +0000 https://blog.nearlyfreespeech.net/?p=464#comment-28417 In reply to Maksim.

Just substitute the server you want to use (gunicorn or uwsgi or whatever) for the development server in the run script. Choices vary widely, are subjective enough to rule out a clear “best” answer, and are not specific to our service, so this article did not cover that. It assumes that if you want that, then it’s familiar ground for you, so you know how to adapt this example accordingly.

Do note that running the “development” server behind our reverse proxies and Apache so that it only gets Django requests, as shown in this article, already addresses most of the arguments against using it in production for many (but by no means all) applications.

Ultimately, we’re not trying to tell Django people how to Django, we’re just showing them how to Django here. Your good judgment should still prevail. 🙂

-jdw

]]>
By: Maksim https://blog.nearlyfreespeech.net/2014/11/17/how-to-django-on-nearlyfreespeech-net/#comment-28350 Sun, 23 Nov 2014 04:52:34 +0000 https://blog.nearlyfreespeech.net/?p=464#comment-28350 These instructions show how to use the Django development server as the daemon. How do you do this for production?

]]>
By: Tim McCormack https://blog.nearlyfreespeech.net/2014/11/17/how-to-django-on-nearlyfreespeech-net/#comment-27937 Thu, 20 Nov 2014 14:19:20 +0000 https://blog.nearlyfreespeech.net/?p=464#comment-27937 Thanks, this looks really useful! I’ve been wanting to get the new version of my photo gallery off of Heroku (it wasn’t a good fit) and this might be the opportunity to bring it back to NFSN.

]]>