python - Application names aren't unique, duplicates: accounts -


i'm attempting run python manage.py makemigration command, i'm greeted following error message:

django.core.exceptions.improperlyconfigured: application labels aren't unique, duplicates: accounts 

i attempted add following accounts.apps.py

from django.apps import appconfig   class accountsconfig(appconfig):     name = 'accounts'     label = 'my_accounts' 

but, gives me following error message:

django.core.exceptions.improperlyconfigured: application names aren't unique, duplicates: accounts 

my security.settings.py installed apps following:

installed_apps = [     'accounts',     'accounts.apps.accountsconfig',     'django.contrib.admin',     'django.contrib.auth',     'django.contrib.contenttypes',     'django.contrib.sessions',     'django.contrib.messages',     'django.contrib.staticfiles', ] 

is error message because have 'accounts', , accounts.apps.accountsconfig in installed_apps? how can accountsconfig part of installed apps allow migration? below applications folder structure.

folder structure

i adding migration following:

from __future__ import unicode_literals django.db import models   class alleeactive(models.model):     employee_last_name = models.charfield(db_column='employee_last_name', max_length=50, blank=true, null=true)  # field name made lowercase.     employee_first_name = models.charfield(db_column='employee_first_name', max_length=50, blank=true, null=true)  # field name made lowercase.     employee_ntname = models.charfield(db_column='employee_ntname',primary_key=true, serialize=false, max_length=50)  # field name made lowercase.     b_level = models.charfield(db_column='b_level', max_length=10, blank=true, null=true)  # field name made lowercase.     group_name = models.charfield(db_column='group_name', max_length=100, blank=true, null=true)  # field name made lowercase.     r_level = models.charfield(db_column='r_level', max_length=10, blank=true, null=true)  # field name made lowercase.     division_name = models.charfield(db_column='division_name', max_length=100, blank=true, null=true)  # field name made lowercase.     d_level = models.charfield(db_column='d_level', max_length=10, blank=true, null=true)  # field name made lowercase.     market_name = models.charfield(db_column='market_name', max_length=100, blank=true, null=true)  # field name made lowercase.     coid = models.charfield(db_column='coid', max_length=50, blank=true, null=true)  # field name made lowercase.     unit_no = models.charfield(db_column='unit_no', max_length=50, blank=true, null=true)  # field name made lowercase.     dept_no = models.charfield(db_column='dept_no', max_length=50, blank=true, null=true)  # field name made lowercase.     department_desc = models.charfield(db_column='department_desc', max_length=50, blank=true, null=true)  # field name made lowercase.     employee_status = models.charfield(db_column='employee_status', max_length=50, blank=true, null=true)  # field name made lowercase.     job_desc = models.charfield(db_column='job_desc', max_length=50, blank=true, null=true)  # field name made lowercase.     position_desc = models.charfield(db_column='position_desc', max_length=50, blank=true, null=true)  # field name made lowercase.     supervisor_last_name = models.charfield(db_column='supervisor_last_name', max_length=50, blank=true, null=true)  # field name made lowercase.     supervisor_first_name = models.charfield(db_column='supervisor_first_name', max_length=50, blank=true, null=true)  # field name made lowercase.     supervisor_job_desc = models.charfield(db_column='supervisor_job_desc', max_length=50, blank=true, null=true)  # field name made lowercase.     cfo = models.charfield(db_column='cfo', max_length=255, blank=true, null=true)  # field name made lowercase.     email_address = models.charfield(db_column='email_address', max_length=250, blank=true, null=true)  # field name made lowercase.     location_code = models.charfield(db_column='location_code', max_length=20, blank=true, null=true)  # field name made lowercase.     location_code_desc = models.charfield(db_column='location_code_desc', max_length=255, blank=true, null=true)  # field name made lowercase.     corporate_flag = models.charfield(db_column='corporate_flag', max_length=1, blank=true, null=true)  # field name made lowercase.     hire_date = models.datetimefield(db_column='hire_date', blank=true, null=true)  # field name made lowercase.     termination_date = models.datetimefield(db_column='termination_date', blank=true, null=true)  # field name made lowercase.     employee_status_id = models.integerfield(db_column='employee_status_id', blank=true, null=true)  # field name made lowercase.     qv_statusid = models.integerfield(db_column='qv_statusid', blank=true, null=true)  # field name made lowercase.     lawson_status_id = models.integerfield(db_column='lawson_status_id', blank=true, null=true)  # field name made lowercase.     load_date = models.datetimefield(db_column='load_date', blank=true, null=true)  # field name made lowercase.      class meta:         managed = false         db_table = 'all_ee_active' 

then i'm trying run following python shell verify migration went through:

>>> accounts.models import alleeactive >>> all_ee_active.objects.all() traceback (most recent call last):   file "<console>", line 1, in <module> nameerror: name 'all_ee_active' not defined >>> alleeactive.objects.all() traceback (most recent call last):   file "<console>", line 1, in <module> nameerror: name 'alleeactive' not defined 

why python not recognize all_ee_active or alleeactive? appears accept import.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -