Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PHP Addiction - or, teach someone about python

PHP Addiction - or, teach someone about python

A talk given at PyCon ZA about some of the rougher aspects of the user experience of someone coming from a PHP background, learning about Python/Django. Video here - http://www.youtube.com/watch?v=_9nM1SpBp4w

Bradley Whittington

October 05, 2012
Tweet

More Decks by Bradley Whittington

Other Decks in Programming

Transcript

  1. Bradley Whittington @darb / [email protected] http://github.com/bradwhittington (PHP) Dev / Ops

    manager at Motribe, a Mxit company (Python) Technical co-founder of Lessfuss
  2. HelloWorld.php: apt-get install apache2 php-5 echo "<?php phpinfo() ?>" >

    /var/www/index.php Open browser to http://localhost
  3. Django HelloWorld (Ghetto style): $ vim urls.py from django.conf.urls import

    patterns, include, url from django.http import HttpResponse def hello(request): return HttpResponse('Ohai') urlpatterns = patterns('', (r'^$', hello), ) :wq $ ./manage.py runserver ... $ xdg-open http://localhost:8000
  4. daemonize your mod_wsgi process in apache Or gunicorn it. Or

    uWSGI. You cray if you mod_python, bro. ♬♫♬♫ Don't forget your static files. ♫♪♬♫
  5. Fine, just use: Heroku | Gondor | Openshift | zzZzzZz

    While you cut your teeth. You'll need git | hg | zzzz too Cos, http://www.12factor.net/