Archives May 2015

Django settings by environment

Published May 22, 2015 in Deployment, Development - Last update on July 6, 2015.

One thing not explained in Django Doc is how to make your project to live accross environments. Some settings need to have different values when used in production or testing, and testers might want to set their own values. A clear example is I wanna use a MySQL in production and SQLite in testing.

What ...

Continue reading

Python, table printing

Published May 21, 2015 in Development - Last update on July 6, 2015.

I always self-asked me how is the code used by mysql command for print tables. I ever don't know but I know how to do that in Python: With Format Specification Mini-Language.

Print a table

A script of my idea looks like this:

GUYS = ['tony', 'joe', 'ugo']
ROW_FORMAT = '| {0:5} | {1:30} |'

print(ROW_FORMAT ...

Continue reading

Ansible Part 1: J'ansible, Tu ansibles, il...

Published May 15, 2015 in Deployment, System administration - Last update on July 6, 2015.

Ansible is my favourite deployment and configuration management tools. After tested direct concurrency, Puppet and Chef, my choice naturally went to Ansible.

  • 1st it is in Python
  • 2nd it has a clear YAML syntax
  • 3rd it is simple.

What's the stack

My blog uses a classical Django webstack: Nginx + uWSGI + Django + MySQL. Because I ...

Continue reading

Previous month

April 2015

Next month

June 2015

Archives