Error while using with account
There are still an error even with the MR!22
Applying sessions.0001_initial... OK
Traceback (most recent call last):
File "/usr/local/bin/sib", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/sib/cli.py", line 66, in install
project.load()
File "/usr/local/lib/python3.7/site-packages/sib/project.py", line 197, in load
User.objects.create_superuser(
File "/usr/local/lib/python3.7/site-packages/django/db/models/manager.py", line 198, in __get__
cls._meta.swapped,
AttributeError: Manager isn't available; 'auth.User' has been swapped for 'djangoldp_account.LDPUser'
For reference:
packages.yml
ldppackages:
djangoldp_project: djangoldp_project
djangoldp_uploader: djangoldp_uploader
djangoldp_circle: djangoldp_circle
djangoldp_notification: djangoldp_notification
djangoldp_account: djangoldp_account
djangoldp_skill: djangoldp_skill
djangoldp_joboffer: djangoldp_joboffer
djangoldp_conversation: djangoldp_conversation
djangoldp_profile: djangoldp_profile
djangoldp_invoice: djangoldp_invoice
# oidc_provider: django-oidc-provider
oidc_provider: 'git+https://github.com/jblemee/django-oidc-provider.git@develop'
server:
site_url: 'http://localhost:8000'
allowed_hosts: []
db_host: localhost
db_name: database
db_user: me
db_pass: changeit
smtp_host: locahost
smtp_user: user
smtp_pass: changeit
admin_email: admin@example.org
admin_name: admin
admin_pass: admin
Changed on settings.py:
# Changed
LOGIN_URL = '/auth/login/'
# Added:
OIDC_REGISTRATION_ENDPOINT_REQ_TOKEN = False
OIDC_REGISTRATION_ENDPOINT_ALLOW_HTTP_ORIGIN = True
OIDC_IDTOKEN_SUB_GENERATOR = 'djangoldp_account.settings.sub_generator'
OIDC_IDTOKEN_EXPIRE = 60 * 60
AUTHENTICATION_BACKENDS.append('djangoldp_account.auth.backends.ExternalUserBackend')
MIDDLEWARE.append('djangoldp_account.auth.middleware.JWTUserMiddleware')
AUTH_USER_MODEL = 'djangoldp_account.LDPUser'
Can still bypass this error by using ./manage.py migrate
then ./manage.py createsuperuser
.