Bug: ImportError: cannot import name 'AdminConfig' from 'starlette_admin.auth' #438
Replies: 5 comments
-
There is no AdminConfig in .auth.py. If you're in a rush like me, you can add it manually.
In auth.py and imports to init. |
Beta Was this translation helpful? Give feedback.
-
That is not released yet, you can install this repository as a package to use it. |
Beta Was this translation helpful? Give feedback.
-
What do you mean when you say "this"? 0.12.2 or starlette-admin in general? If in general, why is it in the pip? But if 0.12.2, then I don't quite understand what you mean by that. |
Beta Was this translation helpful? Give feedback.
-
As far as I remember 'AdminConfig' feature is not in the 0.12.2 version. |
Beta Was this translation helpful? Give feedback.
-
Thanks @dandaniel5 and @hasansezertasan for your help. This feature was added in #374 and will be released in 0.13.0 (https://github.com/jowilf/starlette-admin/milestone/3). We should have multiple versions of the documentation with https://github.com/jimporter/mike to avoid this confusion in the future.
I think @hasansezertasan was suggesting to install the main branch directly (https://pip.pypa.io/en/stable/topics/vcs-support/) |
Beta Was this translation helpful? Give feedback.
-
The bug
After doing as per the admin example for adding a login page cannot import AdminConfig as this is not present in the location
To Reproduce
try to import like this
from starlette_admin.auth import AdminConfig
or when using code snippet from https://jowilf.github.io/starlette-admin/tutorial/authentication/ with AdminConfig it throws this error
Environment (please complete the following information):
Beta Was this translation helpful? Give feedback.
All reactions