

Ask HN: Moving from PHP to Django, setup & host advice? - thomaaas

Hello HNers!<p>For years I&#x27;ve been building my side projects in plain PHP. However, I recently decided to learn Django after reading everywhere that it&#x27;s better than PHP.  
It&#x27;s been only a few days since I&#x27;ve started learning Django, and I&#x27;m already convinced that it&#x27;s awesome: clean syntax, database-abstraction API, auto-generated admin, MVC, etc.<p>But there are also a few things that I really have trouble with:  
- Installation&#x2F;setup&#x2F;configuration. It took me way too long to install Python&#x2F;Django, and then to understand how to deal with static files [1]  
- I can&#x27;t find a host for my Django projects that is simple to use [2]<p>I mean, all of this is trivial to do in PHP.
Since I&#x27;m not really comfortable with these &quot;sysadmin tasks&quot;, I&#x27;m considering to switch back to PHP.<p>Any tips on how to make this less painful?  
Thanks!<p>[1] Actually, it still doesn&#x27;t work properly...  
[2] For example, Heroku, that is supposed to be simple, has a long documentation for Django that is scary to me: https:&#x2F;&#x2F;devcenter.heroku.com&#x2F;articles&#x2F;getting-started-with-django
======
pmtarantino
Hi Thomaaas. I landed on a job position where I had to stopped using PHP and
start to use Django. Not only that, but to use on Google App Engine, for what
I had to use Django Non Rel fork.

My best advice is to get an aaccount on Digital Ocean (www.digitalocean.com)
and reads the tutorials, they will guide you to install a Django App easily. I
was just like you: I didn't like to set up envs and hostings, but it was easy
after I did a few times.

~~~
IgorPartola
\+ 1 for Digital Ocean. I was composing my reply while you posted yours :).

------
IgorPartola
1\. Static files are a bit confusing because they need to be compiled, but
this can be done when you build/deploy OR dynamically. Read the official docs
carefully to grok what it all means.

2\. Heroku really is pretty easy. Once you structure your code properly, you
add a Procfile that looks something like this:

    
    
        web: gunicorn YOUR-PROJECT-NAME.wsgi
    

And it will magically do the rest.

Also, depending on your schedule, learn to do the sysadmin things, and get
yourself a VPS with Digital Ocean for $5/month.

~~~
pedro84
There's a walkthrough of some of those sysadmin-y things here:

    
    
      http://ponytech.net/blog/2013/09/10/django-deployement-ubuntu-upstart-nginx-gunicorn-and-virtualenvwrapper/

