[Django]-Django on Heroku, url template tag causes 'ParseResult' object not callable

0👍

I had a similar problem (actually in the urls.py, not in the template rendering) while using django-piston. I managed to fix it by changing

from django.conf.urls.defaults import url

to

from django.conf.urls.defaults import url as django_url

and then changing all the url() directives in urlpatterns to django_url().

This also fixed up the template thing I was seeing in admin pages. I’m not sure if this is the same thing, but might be a fruitful inquiry.

1👍

While I’m afraid I can’t offer much insight into your issue, with regard to the question “Does anyone know what Heroku changes on deploy?”, then for Django apps, it’s just the following:

Heroku DB config appended to your settings.py

This just overrides your existing DATABASES setting by pulling in the DATABASE_URL in the environment and parsing it accordingly.

Basic Procfile autogenerated if you don’t already have one

Don’t rely on this, as the generated Procfile just uses the Django development server (replace it with e.g. one running gunicorn), but it’s all you need to get a basic project started.

5MB (free) shared database added

This just ensures your app will have a database to access.


Now, I don’t see how any of those would cause the problem you experience, but you seem to have that sorted which is good.

Leave a comment