https://github.com/realpython/flask-registration
https://github.com/realpython/flask-registration
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/realpython/flask-registration
- Owner: realpython
- License: mit
- Created: 2014-12-26T12:53:27.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2018-09-14T16:38:22.000Z (about 7 years ago)
- Last Synced: 2025-05-07T21:03:54.762Z (7 months ago)
- Language: Python
- Homepage: https://realpython.com/blog/python/handling-email-confirmation-in-flask/
- Size: 32.2 KB
- Stars: 101
- Watchers: 8
- Forks: 39
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Flask Registration
[](https://travis-ci.org/realpython/flask-registration)
Starter app for managing users - login/logout, registration, and email confirmation.
**Blog posts:**
- Part 1: [Handling Email Confirmation During Registration in Flask](https://realpython.com/blog/python/handling-email-confirmation-in-flask)
- Part 2: [The Minimum Viable Test Suite](https://realpython.com/blog/python/the-minimum-viable-test-suite/)
## QuickStart
### Set Environment Variables
Development Example (with [Debug Mail](https://debugmail.io)):
```sh
$ export APP_SETTINGS="project.config.DevelopmentConfig"
$ export APP_MAIL_SERVER=debugmail.io
$ export APP_MAIL_PORT=25
$ export APP_MAIL_USE_TLS=true
$ export APP_MAIL_USE_SSL=false
$ export APP_MAIL_USERNAME=ADDYOUROWN
$ export APP_MAIL_PASSWORD=ADDYOUROWN
```
Production Example:
```sh
$ export APP_SETTINGS="project.config.ProductionConfig"
$ export APP_MAIL_SERVER=ADDYOUROWN
$ export APP_MAIL_PORT=ADDYOUROWN
$ export APP_MAIL_USE_TLS=ADDYOUROWN
$ export APP_MAIL_USE_SSL=ADDYOUROWN
$ export APP_MAIL_USERNAME=ADDYOUROWN
$ export APP_MAIL_PASSWORD=ADDYOUROWN
```
### Update Settings in Production
1. `SECRET_KEY`
1. `SQLALCHEMY_DATABASE_URI`
### Create DB
Run:
```sh
$ sh create.sh
```
Or:
```sh
$ python manage.py create_db
$ python manage.py db init
$ python manage.py db migrate
$ python manage.py create_admin
```
Want to clean the environment? Run:
```sh
sh clean.sh
```
### Run
```sh
$ python manage.py runserver
```
### Testing
Without coverage:
```sh
$ python manage.py test
```
With coverage:
```sh
$ python manage.py cov
```