Django-Heroku (Python Library)
==============================
.. image:: https://travis-ci.org/heroku/django-heroku.svg?branch=master
:target: https://travis-ci.org/heroku/django-heroku
This is a Django library for Heroku applications that ensures a seamless deployment and development experience.
This library provides:
- Settings configuration (Static files / WhiteNoise).
- Logging configuration.
- Test runner (important for `Heroku CI <https://www.heroku.com/continuous-integration>`_).
--------------
Django 2.0 is targeted, but older versions of Django should be compatible. Only Python 3 is supported.
Usage of Django-Heroku
----------------------
In ``settings.py``, at the very bottom::
…
# Configure Django App for Heroku.
import django_heroku
django_heroku.settings(locals())
This will automatically configure ``DATABASE_URL``, ``ALLOWED_HOSTS``, WhiteNoise (for static assets), Logging, and Heroku CI for your application.
**Bonus points!** If you set the ``SECRET_KEY`` environment variable, it will automatically be used in your Django settings, too!
Disabling Functionality
///////////////////////
``settings()`` also accepts keyword arguments that can be passed ``False`` as a value, which will disable automatic configuration for their specific areas of responsibility:
- ``databases``
- ``test_runner``
- ``staticfiles``
- ``allowed_hosts``
- ``logging``
- ``secret_key``
-----------------------
You can also just use this library to provide a test runner for your Django application, for use on Heroku CI::
import django_heroku
TEST_RUNNER = 'django_heroku.HerokuDiscoverRunner'
✨🍰✨
Raw data
{
"_id": null,
"home_page": "https://github.com/heroku/django-heroku",
"name": "django-heroku",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Kenneth Reitz",
"author_email": "kreitz@salesforce.com",
"download_url": "https://files.pythonhosted.org/packages/0f/04/226d82630d560afbe3b8b6e204c397bc3e55c26b851d6d2abb7a85e1a72a/django-heroku-0.3.1.tar.gz",
"platform": "",
"description": "\nDjango-Heroku (Python Library)\n==============================\n\n.. image:: https://travis-ci.org/heroku/django-heroku.svg?branch=master\n :target: https://travis-ci.org/heroku/django-heroku\n\nThis is a Django library for Heroku applications that ensures a seamless deployment and development experience.\n\nThis library provides:\n\n- Settings configuration (Static files / WhiteNoise).\n- Logging configuration.\n- Test runner (important for `Heroku CI <https://www.heroku.com/continuous-integration>`_).\n\n--------------\n\nDjango 2.0 is targeted, but older versions of Django should be compatible. Only Python 3 is supported.\n\nUsage of Django-Heroku\n----------------------\n\nIn ``settings.py``, at the very bottom::\n\n \u2026\n # Configure Django App for Heroku.\n import django_heroku\n django_heroku.settings(locals())\n\nThis will automatically configure ``DATABASE_URL``, ``ALLOWED_HOSTS``, WhiteNoise (for static assets), Logging, and Heroku CI for your application.\n\n**Bonus points!** If you set the ``SECRET_KEY`` environment variable, it will automatically be used in your Django settings, too!\n\nDisabling Functionality\n///////////////////////\n\n``settings()`` also accepts keyword arguments that can be passed ``False`` as a value, which will disable automatic configuration for their specific areas of responsibility:\n\n- ``databases``\n- ``test_runner``\n- ``staticfiles``\n- ``allowed_hosts``\n- ``logging``\n- ``secret_key``\n\n-----------------------\n\nYou can also just use this library to provide a test runner for your Django application, for use on Heroku CI::\n\n import django_heroku\n TEST_RUNNER = 'django_heroku.HerokuDiscoverRunner'\n\n\u2728\ud83c\udf70\u2728\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "This is a Django library for Heroku apps.",
"version": "0.3.1",
"project_urls": {
"Homepage": "https://github.com/heroku/django-heroku"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "59af5475a876c5addd5a3494db47d9f7be93cc14d3a7603542b194572791b6c6",
"md5": "2d298de5288c0d3d49ce9cd0a74d1fbc",
"sha256": "2bc690aab89eedbe01311752320a9a12e7548e3b0ed102681acc5736a41a4762"
},
"downloads": -1,
"filename": "django_heroku-0.3.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "2d298de5288c0d3d49ce9cd0a74d1fbc",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 6240,
"upload_time": "2018-03-01T20:39:20",
"upload_time_iso_8601": "2018-03-01T20:39:20.156116Z",
"url": "https://files.pythonhosted.org/packages/59/af/5475a876c5addd5a3494db47d9f7be93cc14d3a7603542b194572791b6c6/django_heroku-0.3.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0f04226d82630d560afbe3b8b6e204c397bc3e55c26b851d6d2abb7a85e1a72a",
"md5": "f04149b24d8ca9f4f45b5650d2d1cff1",
"sha256": "6af4bc3ae4a9b55eaad6dbe5164918982d2762661aebc9f83d9fa49f6009514e"
},
"downloads": -1,
"filename": "django-heroku-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "f04149b24d8ca9f4f45b5650d2d1cff1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5236,
"upload_time": "2018-03-01T20:39:21",
"upload_time_iso_8601": "2018-03-01T20:39:21.776417Z",
"url": "https://files.pythonhosted.org/packages/0f/04/226d82630d560afbe3b8b6e204c397bc3e55c26b851d6d2abb7a85e1a72a/django-heroku-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2018-03-01 20:39:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "heroku",
"github_project": "django-heroku",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"lcname": "django-heroku"
}