2

I have been working on the issue of duplicate labels in Django and from this answer I have added the following files to my "jobs" project folder:

jobs/apps.py

# jobs/apps.py

from django.apps import AppConfig

class JobsConfig(AppConfig):
    name = 'jobs'
    verbose_name = "jobs2"

jobs/init.py

# jobs/__init__.py

default_app_config = 'jobs.apps.JobsConfig'

This hasn't really helped much and I still get the error when trying syncdb:

"duplicates: %s" % app_config.label)
django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: jobs

Also, changing from "name = 'jobs'" to "name = 'jobs2'" just gives me the error:

ImportError: No module named jobs2

File Structure

/opt/Webapp
    ├── userfiles
    ├── templates
    │   └── admin
    │       └── base.html
    ├── static
    │   ├── admin_tools
    │   │   ├── images
    │   │   │   └── apto.gif
    │   │   └── css
    │   │       └── theming.css
    │   └── admin
    │       └── css
    │           └── base.css
    ├── smartrecruitment
    │   ├── wsgi.py
    │   ├── urls.py
    │   ├── settings.pyc
    │   ├── settings.py
    │   ├── __init__.pyc
    │   └── __init__.py
    ├── requirements.txt
    ├── manage.py
    ├── jobs
    │   ├── views.py
    │   ├── urls.py
    │   ├── tests.py
    │   ├── testhelpers.py
    │   ├── templates
    │   │   └── jobs
    │   │       ├── test.html
    │   │       ├── success.html
    │   │       ├── registration.html
    │   │       ├── registrationcomplete.html
    │   │       └── application.html
    │   ├── tables.py
    │   ├── static
    │   │   └── jobs
    │   │       ├── styles
    │   │       │   ├── index.css
    │   │       │   ├── hide_admin_original.css
    │   │       │   └── application.css
    │   │       ├── style.css
    │   │       └── images
    │   │           └── apto.gif
    │   ├── models.py
    │   ├── migrations
    │   │   ├── __init__.py
    │   │   ├── 0002_auto__del_field_registrant_name__add_field_registrant_first_name__add_.py
    │   │   └── 0001_initial.py
    │   ├── lists.py
    │   ├── __init__.pyc
    │   ├── __init__.py
    │   ├── forms.py
    │   ├── apps.pyc
    │   ├── apps.py
    │   └── admin.py
    ├── fileuploads
    │   ├── tests.py
    │   ├── templates
    │   │   └── fileuploads
    │   │       ├── index.html
    │   │       ├── details.html
    │   │       ├── base.html
    │   │       └── add.html
    │   ├── models.pyc
    │   ├── models.py
    │   ├── __init__.pyc
    │   ├── __init__.py
    │   ├── forms.pyc
    │   ├── forms.py
    │   ├── context_processors.py
    │   └── admin.pyc
    ├── dashboard.pyc
    └── dashboard.py
Community
  • 1
  • 1
Jon
  • 3,174
  • 11
  • 39
  • 57

1 Answers1

2

You have a mix of old-style (south: 0002_auto_del...) and new-style (django: 0001_initial) migrations in your jobs app. Easiest fix would be to delete all numbered migrations rm jobs/migrations/0???_*.py* and recreate migrations by running manage.py makemigrations

ryuusenshi
  • 1,976
  • 13
  • 15