Fork me on GitHub

Other articles


  1. Parsing MongoDB URI

    Rather than hard-code the configuration into a Python based settings file, when using a PaaS such as Heroku you want to pick up the MongoDB URI from the system settings. Here's what I do:

    # get the dynamic elements from the MongoURI
    import os
    import re
    r = r'^mongodb\:\/\/(?P ...
    read more

    There are comments.

  2. My new blog

    What I did to get it running:

    pip install pelican
    git clone git://github.com/pydanny/pydanny.github.com.git
    

    My settings.py file:

    AUTHOR = 'Daniel Greenfeld'
    DISQUS_SITENAME = 'pydanny'
    GITHUB_URL = 'https://github.com/pydanny'
    GOOGLE_ANALYTICS='UA-18066389-2'
    SITEURL = 'http://pydanny.github.com'
    SITENAME = 'pydanny'
    SOCIAL = (('twitter', 'http://twitter.com/pydanny'),
              ('github ...
    read more

    There are comments.

social