Comments (3)
Hi @nielslerches, thanks for the report! I think this is maybe both a bug and a case of missing documentation :)
The Admin Bundle includes its own AdminSecurityController
- which is the same as the regular SecurityController
, except it is configured to use admin-specific templates. This should be included in your declarative routes like so:
# your-project/your_app_bundle/routes.py
from flask_unchained import (controller, resource, func, include, prefix,
get, delete, post, patch, put, rule)
routes = lambda: [
# ...
include('flask_unchained.bundles.admin.routes'),
]
And then, if you take a look at flask_unchained/bundles/admin/routes.py
, the endpoint names must also be configured to match:
# your-project/your_app_bundle/config.py
from flask_unchained import BundleConfig
class Config(BundleConfig):
ADMIN_LOGIN_ENDPOINT = 'admin.login'
ADMIN_LOGOUT_ENDPOINT = 'admin.logout'
Hopefully that gets it working as expected?
from flask-unchained.
Yes, this solves the problem :)
from flask-unchained.
Hi @nielslerches, I've just pushed a new release, v0.8.1
, that fixes this and a few other bugs I discovered playing around with the Admin Bundle. It also adds a couple new features, for example better integrating the Security Bundle with the Admin interface by adding ModelAdmin
s for the User
and Role
classes. Apologies for the delay in getting this pushed and please do let me know if you encounter any other issues and/or have any questions - I'll do my best to answer them as quickly as I can! Thanks again :)
from flask-unchained.
Related Issues (11)
- KeyError: 'No serializer found for the User model HOT 5
- stacking route annotations HOT 5
- wrong redirect uri for oauth using docker HOT 2
- immutabledict is not defined when using SQLAlchemy Bundle & Migrations HOT 1
- Possible switch from venv to pipenv HOT 3
- Where would you put plain python classes? HOT 1
- KeyError: 'UserResource.patch' HOT 2
- no such table: flask_sessions HOT 2
- Create a new release? HOT 1
- consider using black formatter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask-unchained.