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.

social