Apache / Django Install: RuntimeError: django.contrib.contenttypes.models.ContentType model class does not declare explicit

I am using Django 1.9 and python 2.7 on centos7

I get the following error ONLY when trying to use Apache with Django.

RuntimeError: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS. 

I am NOT getting an error using the Django web server, my application works fine on the Django web server, but I have not read about using the Django web server other than Apache.

I ran into several problems trying to get apache to work with django and found solutions for all previous problems, but cannot solve this problem.

Here are my installed applications with " django.contrib.contenttypes " listed in the following order:

 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'admin_alerts', 'admin_dq_metrics', 'admin_db_conn', 'admin_file_conn', 'admin_application', 'admin_process', 'admin_src_status_chk', 'admin_scheduler_template', 'export_to_db', 'export_to_file', 'migrate_to_prod', 'migrate_to_stg', 'migrate_to_dev', 'tableau_tde', 'ingest_file', 'ingest_db', 'scheduler', 'dq_entity_cross_ref', 'high_water_column_ref', 'process_control', 'difa_login', 'admin_create_user', 'update_export_ingest_data', 'admin_add_user', 'django.contrib.sites', 

Thanks...

+5
source share

Source: https://habr.com/ru/post/1258354/


All Articles