Closed wnh closed 10 years ago
:+1:
+1
Is there a way that I can use this with Heroku and Django 1.4?
The way I used it was to pip uninstall dj-static
and then re-install it using the Django 1.4 compat fork/branch:
pip install git+https://github.com/wnh/dj-static.git@feature/django-1.4-compat#egg=dj-static
and then "git+https://github.com/wnh/dj-static.git@feature/django-1.4-compat#egg=dj-static " should get written to requirements.txt when I freeze, right?
I'm just using the the master zip file straight from github (https://github.com/wnh/dj-static/archive/master.zip)
Although you need to put the URL explicitly in your requirements.txt file, because pip freeze
will still report it as dj-static==0.0.5
I tried both of these methods and both worked locally but when I pushed to Heroku I got the same error. Is anyone using this successfully with Heroku and Django 1.4?:
2013-10-15T20:09:37.910845+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2013-10-15T20:09:37.911024+00:00 app[web.1]: from dj_static import Cling
2013-10-15T20:09:37.911024+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/dj_static.py", line 7, in <module>
2013-10-15T20:09:37.911024+00:00 app[web.1]: from django.core.handlers.base import get_path_info
2013-10-15T20:09:37.911024+00:00 app[web.1]: ImportError: cannot import name get_path_info
you need to wipe the virtualenv on heroku clean by creating a runtime.txt with this line: python-2.7.3
and then re-deploy to herok.
On Tue, Oct 15, 2013 at 4:14 PM, sangel10 notifications@github.com wrote:
I tried both of these methods and both worked locally but when I pushed to Heroku I got the same error. Is anyone using this successfully with Heroku and Django 1.4?:
2013-10-15T20:09:37.910845+00:00 app[web.1]: self.wsgi = self.app.wsgi() 2013-10-15T20:09:37.911024+00:00 app[web.1]: from dj_static import Cling 2013-10-15T20:09:37.911024+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/dj_static.py", line 7, in
2013-10-15T20:09:37.911024+00:00 app[web.1]: from django.core.handlers.base import get_path_info 2013-10-15T20:09:37.911024+00:00 app[web.1]: ImportError: cannot import name get_path_info — Reply to this email directly or view it on GitHubhttps://github.com/kennethreitz/dj-static/pull/12#issuecomment-26368160 .
nate@appsembler.com +1 (617) 517-4953 http://twitter.com/natea | http://linkedin.com/in/natea
@natea great, that did the trick. thanks.
Thanks so much!
Would you mind doing a quick rebase so I can merge this in? :D
Manually merging.
Thanks @tinnet for doing all the real work