Comments (6)
Just thinking out loud: maybe the same message
argument could be used to turn the feature on/off.
SimpleLogin(app)
, implyingmessages = None
, uses the defaults, which if show messages as defined in the packageSimpleLogin(app, messages=messages)
uses the customized messages passedSimpleLogin(app, messages=False)
turns off the messaging feature
messages value/type |
On/Off | Message texts |
---|---|---|
None |
On | Default |
dict |
On | Customized |
False |
Off | N/A |
from flask-simplelogin.
I don't know, I'm still a beginner, but I'd love to hear your thoughts on this, and to contribute where I can.
from flask-simplelogin.
I do think it's a great idea and I'm willing to support anyone in developing this.
I have two minor comments, though:
- I think that aligned with every other simple (one value) customization we have, I would encourage a setting
SIMPLELOGIN_SHOW_MESSAGE
instead of using an argument in theSimpleLogin(show_messages=False)
. - Regarding the messages, I'd go for a
namedtuple
instead of a dictionary, that is to say
messages = {
'login-success': Message('someCategory', 'someMessage')
}
instead of:
messages = {
'login-success', {'message':'someMessage', 'category':'someCategory'},
}
from flask-simplelogin.
I like that idea. That's a lot clearer and simpler way of doing it. My only concern is with access_denied
and auth_error
. I didn't realize those were return
statements, I assumed the were all flash()
I guess it would make the most sense just the leave them as is, but it seems inconsistent, and harder to explain that way.
Once I've written some code, how do I share it with you? Is that what a pull request is for? Or is that only when everything is finished? Obviously I can't commit to a new branch, right?
from flask-simplelogin.
Once I've written some code, how do I share it with you? Is that what a pull request is for?
Yes, that is what pull requests are for 🤘
Or is that only when everything is finished?
You can open a PR (pull request) as a draft (or work in progress), that is great for a more interactive cycle of feedback and development.
Obviously I can't commit to a new branch, right?
Actually that's the best strategy to create a pull request! I'll try to summarize the steps:
- Fork this repository in your account
- Clone your fork locally
- Create a new branch for you to work on this features
- Get started, yay
- Commit progress to this new branch
- Push changes to your remote repository (still in the feature branch)
- At this point you can go back to GitHub page and open the PR
- Also, once you open the PR, every commit pushed to that featured branch will be automatically included in the opened PR
from flask-simplelogin.
Closed by #18
from flask-simplelogin.
Related Issues (19)
- simple_log soesn't work for blueprints HOT 3
- Add a REQUIRES_LOGIN_FOR_ALL_VIEWS config as refered in #10 HOT 2
- menu disappears when browser small HOT 4
- Could not find a version that satisfies the requirement flask_simplelogin (from versions: ) HOT 1
- Login Page UI HOT 1
- Rename the repository HOT 3
- Lack of documentation regarding unit testing. HOT 6
- Open redirect vulnerability HOT 2
- Add documentation HOT 1
- New release? HOT 3
- Automate releases based on tags HOT 1
- Translation of internal messages HOT 1
- csrf_token The CSRF token is invalid HOT 2
- New flask release deprecates flask.json.JSONEncoder which is used by the pinned flask_wtf 0.x
- Callback on logout HOT 1
- start sample_app.py error HOT 4
- Add a way to configurate login_url and logout_url HOT 2
- How to find out which user has logged in? HOT 4
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-simplelogin.