Forums

RuntimeError at / on pythonanywhere.com

Hi I published my django app on pythonanywhere every setting looking fine but I am face with this error

RuntimeError at / Model class astana.models.Course doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS. Request Method: GET Request URL: http://astanaict.pythonanywhere.com/ Django Version: 1.11b1 Exception Type: RuntimeError Exception Value:
Model class astana.models.Course doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS. Exception Location: /usr/local/lib/python3.6/dist-packages/django/db/models/base.py in new, line 118 Python Executable: /usr/local/bin/uwsgi Python Version: 3.6.0 Python Path:
['/home/astanaict/mysite', '/var/www', '.', '', '/var/www', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']

How to solve it ?

here is the setting

INSTALLED_APPS = [ 'astana.apps.AstanaConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ]

It looks like you're trying to use a model that is not in installed app and doesn't have an app_label.