Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s-m-i-t-a/flask-musers
Flask app for store user in MongoDB and simple views for login, logout and registration.
https://github.com/s-m-i-t-a/flask-musers
hacktoberfest
Last synced: 5 days ago
JSON representation
Flask app for store user in MongoDB and simple views for login, logout and registration.
- Host: GitHub
- URL: https://github.com/s-m-i-t-a/flask-musers
- Owner: s-m-i-t-a
- License: bsd-3-clause
- Created: 2014-07-21T12:44:13.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-22T12:00:56.000Z (about 8 years ago)
- Last Synced: 2024-10-07T03:09:02.556Z (about 1 month ago)
- Topics: hacktoberfest
- Language: Python
- Homepage:
- Size: 404 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
Awesome Lists containing this project
README
===============================
Flask mongo users
===============================.. image:: https://badge.fury.io/py/flask-musers.png
:target: http://badge.fury.io/py/flask-musers.. image:: https://travis-ci.org/s-m-i-t-a/flask-musers.png?branch=master
:target: https://travis-ci.org/s-m-i-t-a/flask-musers.. image:: https://coveralls.io/repos/s-m-i-t-a/flask-musers/badge.png
:target: https://coveralls.io/r/s-m-i-t-a/flask-musersFlask app for store user in MongoDB and simple views for login, logout and registration.
* Free software: BSD license
Quickstart
----------
Install flask-musers::pip install flask-musers
In the app you must init the ``MUsers``::
from flask import Flask
from flask.ext.musers import MUsersapp = Flask(__name__)
MUsers(app)and register ``flask-musers`` blueprint::
from flask_musers.views import musers
app.register_blueprint(musers)
then must be prepared templates for registration - ``musers/register.html`` and login - ``musers/login.html``.
Views has names ``musers.register``, ``musers.login`` and ``musers.logout``. They are used in ``url_for``::
from flask import url_for
url_for('musers.register')
url_for('musers.login')
url_for('musers.logout')Config
------* ``MUSERS_ALLOW_REGISTRATIONS`` - set to ``False``, when you want disable registrations. Default: ``True``
* ``MUSERS_PASSWORD_VALIDATOR`` - used for custom validator. The dotted name for the object to import. Default: `None`