Coder Social home page Coder Social logo

ojarva / django-compressor-heroku-buildpack Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 11.0 11 KB

Heroku buildpack for django-compressor

License: MIT License

Shell 100.00%
heroku buildpack django-compressor django staticfiles css js cssmin minifier

django-compressor-heroku-buildpack's Introduction

Heroku buildpack for django-compressor

Django-compressor is a convenient static files processor for Django, bundling and compressing JS and CSS files from regular HTML tags, without need to define bundles separately.

This buildpack runs offline compression with python manage.py compress --force, if django-compressor exists in requirements.txt. No other configuration options are checked to determine whether compress should run.

Licensed under MIT license.

How to enable this buildpack?

Go to https://dashboard.heroku.com/ , select your application, settings, "Add buildpack". Enter https://github.com/ojarva/django-compressor-heroku-buildpack.git to buildpack URL field.

Alternatively use Heroku CLI tool with heroku buildpacks:add https://github.com/ojarva/django-compressor-heroku-buildpack.git.

How to contribute?

Fork this repository in Github, create a new branch, make your changes and create a new PR.

This buildpack is only for django-compressor, and exclusive for Heroku. Please create a separate buildpack if you want to add support for any other plugins/addons/...

django-compressor-heroku-buildpack's People

Contributors

andrlik avatar ojarva avatar ojh avatar

Watchers

 avatar

django-compressor-heroku-buildpack's Issues

KeyError: 'DJANGO_SECRET_KEY'

When I add this buildpack to heroku, I receive following error when pushing the git to heroku:

[root@zubserv utiluruServer]# git push heroku master
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 385 bytes | 0 bytes/s, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: ! The latest version of Python 3 is python-3.6.5 (you are using python-3.6.3, which is unsupported).
remote: ! We recommend upgrading by specifying the latest version (python-3.6.5).
remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing requirements with pip
remote:
remote: -----> $ python manage.py collectstatic --noinput
remote: /app/.heroku/python/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
remote: """)
remote: 187 static files copied to '/tmp/build_918c6de6c7aaae1c4390cf0a65ae5b06/staticfiles'.
remote:
remote: -----> django-compressor app detected
remote: -----> Running django-compressor
remote: Traceback (most recent call last):
remote: File "manage.py", line 15, in <module>
remote: execute_from_command_line(sys.argv)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
remote: utility.execute()
remote: File "/app/.heroku/python/lib/python3.6/site-packages/django/core/management/__init__.py", line 317, in execute
remote: settings.INSTALLED_APPS
remote: File "/app/.heroku/python/lib/python3.6/site-packages/django/conf/__init__.py", line 56, in __getattr__
remote: self._setup(name)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/django/conf/__init__.py", line 43, in _setup
remote: self._wrapped = Settings(settings_module)
remote: File "/app/.heroku/python/lib/python3.6/site-packages/django/conf/__init__.py", line 106, in __init__
remote: mod = importlib.import_module(self.SETTINGS_MODULE)
remote: File "/app/.heroku/python/lib/python3.6/importlib/__init__.py", line 126, in import_module
remote: return _bootstrap._gcd_import(name[level:], package, level)
remote: File "<frozen importlib._bootstrap>", line 994, in _gcd_import
remote: File "<frozen importlib._bootstrap>", line 971, in _find_and_load
remote: File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
remote: File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
remote: File "<frozen importlib._bootstrap_external>", line 678, in exec_module
remote: File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
remote: File "/tmp/build_918c6de6c7aaae1c4390cf0a65ae5b06/utiluruServer/settings.py", line 34, in <module>
remote: SECRET_KEY = os.environ['DJANGO_SECRET_KEY']
remote: File "/app/.heroku/python/lib/python3.6/os.py", line 669, in __getitem__
remote: raise KeyError(key) from None
remote: KeyError: 'DJANGO_SECRET_KEY'
remote: ! Push rejected, failed to compile django-compressor app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to utiluru.

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.