Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to run migration when using AbstractUser #12

Open
kunambi opened this issue May 12, 2016 · 3 comments
Open

Not possible to run migration when using AbstractUser #12

kunambi opened this issue May 12, 2016 · 3 comments

Comments

@kunambi
Copy link

kunambi commented May 12, 2016

I assume that this error appears since I'm extending User with AbstractUser.

(env) C:\xampp\htdocs\woe>python manage.py migrate longerusernameandemail
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_from_command_line(sys.argv)
  File "C:\xampp\htdocs\woe\env\lib\site-packages\django\core\management\__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "C:\xampp\htdocs\woe\env\lib\site-packages\django\core\management\__init__.py", line 327, in execute
    django.setup()
  File "C:\xampp\htdocs\woe\env\lib\site-packages\django\__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "C:\xampp\htdocs\woe\env\lib\site-packages\django\apps\registry.py", line 115, in populate
    app_config.ready()
  File "C:\xampp\htdocs\woe\env\lib\site-packages\django\contrib\admin\apps.py", line 22, in ready
    self.module.autodiscover()
  File "C:\xampp\htdocs\woe\env\lib\site-packages\django\contrib\admin\__init__.py", line 26, in autodiscover
    autodiscover_modules('admin', register_to=site)
  File "C:\xampp\htdocs\woe\env\lib\site-packages\django\utils\module_loading.py", line 50, in autodiscover_modules
    import_module('%s.%s' % (app_config.name, module_to_search))
  File "C:\Python27\Lib\importlib\__init__.py", line 37, in import_module
    __import__(name)
  File "C:\xampp\htdocs\woe\env\lib\site-packages\longerusernameandemail\admin.py", line 19, in <module>
    admin.site.unregister(User)
  File "C:\xampp\htdocs\woe\env\lib\site-packages\django\contrib\admin\sites.py", line 123, in unregister
    raise NotRegistered('The model %s is not registered' % model.__name__)
django.contrib.admin.sites.NotRegistered: The model User is not registered
@madssj
Copy link
Owner

madssj commented May 12, 2016

I'm really not maintaining this anymore, but what django version are you trying to run it with?

@kunambi
Copy link
Author

kunambi commented May 13, 2016

Hi,

Using latest django version 1.9.6:

>>> import django
>>> django.VERSION
(1, 9, 6, 'final', 0)

@madssj
Copy link
Owner

madssj commented May 13, 2016

You shouldn't use this package with newer django versions. Any particular reason you'd like to use it with 1.9?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants