Skip to main content Link Search Menu Expand Document (external link)

Project Resources

Table of Contents

  1. Git Resources
  2. Web Design Resources
  3. Django Resources
  4. Heroku Resources
    1. Avoiding the macOS / psycopg2 error

Git Resources

Git Cheat Sheet

Web Design Resources

Django Resources

Heroku Resources

Avoiding the macOS / psycopg2 error

Use this code at the bottom of your file to try/catch the import of django-heroku so it only has to work when deployed to heroku and not locally:

# Activate Django-Heroku.
# Use this code to avoid the psycopg2 / django-heroku error!  
# Do NOT import django-heroku above!
    if 'HEROKU' in os.environ:
        import django_heroku
except ImportError:
    found = False