0

I have read all questions on this site and all other tutorials on the web and nothing is working for me, and I'm really thinking of just dropping heroku all together.

here's my issue, when I set DEBUG to False, I get a 500 error, but I can still access my admin page, normally.

my heroku settings is as follows

from base import * 
import dj_database_url

from os.path import abspath, basename, dirname, join, normpath
from sys import path
from memcacheify import memcacheify

CACHES = memcacheify()

# Allow all host headers


DATABASES['default'] =  dj_database_url.config()
SITE_ID = 3

DEBUG = False
ALLOWED_HOSTS = ["*"]

I have tried allowed hosts to be my-herokuapp.herokoapp.com and to be localhost, and localhost ip. I'm out of ideas and I have no idea why it's not working.

Hayley Guillou
  • 3,953
  • 4
  • 24
  • 34
camara90100
  • 852
  • 2
  • 10
  • 18
  • What pages are returning the 500 error when `DEBUG = False`? Everything *but* the admin page? Can you update your question with the output of `heroku logs --source app`? I also assume you added `pylibmc==1.2.3` to your `requirements.txt` as per https://github.com/rdegges/django-heroku-memcacheify#usage – elithrar Jul 13 '15 at 02:14
  • 2
    What is the error message? You should configure the django logging to write errors to a logfile when using `DEBUG = False`. There's more info about configuring logging in this thread: http://stackoverflow.com/questions/4558879/python-django-log-to-console-under-runserver-log-to-file-under-apache – Håken Lid Jul 13 '15 at 06:56
  • @elithrar pylimbc is in my requirements.txt file, and yes everything but the admin page is not working. – camara90100 Jul 13 '15 at 09:24

1 Answers1

0

if local ALLOWED_HOSTS = ['localhost', '127.0.0.1'] else ALLOWED_HOSTS = ['web.ru']

Alex Karahanidi
  • 921
  • 6
  • 13