Coder Social home page Coder Social logo

mjabuz / django-heroku Goto Github PK

View Code? Open in Web Editor NEW

This project forked from heroku/django-heroku

0.0 1.0 0.0 43 KB

A Django library for Heroku apps.

Home Page: https://pypi.org/project/django-heroku/

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.34% Python 99.66%

django-heroku's Introduction

Django-Heroku (Python Library)

image

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).

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'

django-heroku's People

Contributors

danidee10 avatar jmorrell avatar kennethreitz avatar p13i avatar sigmavirus24 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.