mirror of
https://github.com/jeffknupp/sandman2.git
synced 2026-04-25 00:25:49 +03:00
[GH-ISSUE #244] ValueError: The name 'admin' is already registered for a different blueprint. Use 'name=' to provide a unique name. #80
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
pull-request
question
refactoring
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/sandman2-jeffknupp#80
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chenfei5201213 on GitHub (Nov 8, 2021).
Original GitHub issue: https://github.com/jeffknupp/sandman2/issues/244
Traceback (most recent call last):
File "/Users/chenfei/anaconda3/bin/sandman2ctl", line 8, in
sys.exit(main())
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/sandman2/main.py", line 57, in main
app = get_app(args.URI, read_only=args.read_only, schema=args.schema)
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/sandman2/app.py", line 60, in get_app
_reflect_all(exclude_tables, admin, read_only, schema=schema)
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/sandman2/app.py", line 139, in _reflect_all
register_model(cls, admin)
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/sandman2/app.py", line 173, in register_model
admin.add_view(CustomAdminView(cls, db.session))
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/flask_admin/base.py", line 540, in add_view
self.app.register_blueprint(view.create_blueprint(self))
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/flask/scaffold.py", line 57, in wrapper_func
return f(self, *args, **kwargs)
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/flask/app.py", line 1028, in register_blueprint
blueprint.register(self, options)
File "/Users/chenfei/anaconda3/lib/python3.7/site-packages/flask/blueprints.py", line 306, in register
f"The name '{self_name}' is already registered for"
ValueError: The name 'admin' is already registered for a different blueprint. Use 'name=' to provide a unique name.