Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

generic 12factor manage.py for containers

Base manage.main hack which supports being an entry point.

In your project setup.py, add::

entry_points={
    'console_scripts': [
        'yourproject = yourproject.manage:main',
    ],
}

Replace your manage.py content with::

#!/usr/bin/env python
from crudlfap.manage import main

if __name__ == '__main__':
    main('yourproject.settings')

Note that it will enable DEBUG env ...

Don't be the product, buy the product!

Schweinderl