I have a model which I'm keen to integrate to my open shift platform. The issue I'm having is that my view imports the model, but this causes a failure, but this should be pretty standard. I cannot see what the error from the log is - but I don't get any rendering of anything on screen, 500 error.
rhc tail amycoolapp
doesn't provide much guidance to error? Where can I find more errors the rhc tail simply shows thepython.log
- is there another log that I can use that contains more information?from django.db import models
works when included inmodels.py
which in turn is included inviews.py
.- Including a class definition causes the failure (
class Test(models.Model): s="hello"
). It seems the use of models.Model is an issue. - My directory structure is such that
models.py
andviews.py
at at the same level in a directory under the app name. - In
settings.py
we have:INSTALLED_APPS = ('amycoolapp',)
which is the name of the app and the folder thatviews.py
andmodels.py
sits in. - Managed to get some logging out: [Wed Jul 30 14:23:30 2014] [error] [client 127.8.250.1] ImportError: No module named 'amycoolapp'
I switched on logging so I get the following when I include the dummy model class in my views.py
IndexError at /
list index out of range
Request Method: GET
Request URL: http://xxx.rhcloud.com/
Django Version: 1.6.5
Exception Type: IndexError
Exception Value:
list index out of range
Exception Location: /var/lib/openshift/53b536da5004463b6e00022e/python/virtenv/venv/lib/python3.3/site-packages/Django-1.6.5-py3.3.egg/django/db/models/base.py in __new__, line 92
Python Executable: /var/lib/openshift/53b536da5004463b6e00022e/python//virtenv/venv/bin/python3
Python Version: 3.3.2
Any suggestions? It fails with the addition of:
from django.db import models
class Test(models.Model):
s = 'hello'