Pārlūkot izejas kodu

updating Flask config and testing for issue with login redirects

joel
Simon Bowie pirms 2 gadiem
vecāks
revīzija
00054099a9
3 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. +1
    -1
      .env.template
  2. +1
    -0
      README.md
  3. +1
    -0
      web/app/auth.py

+ 1
- 1
.env.template Parādīt failu

@@ -3,7 +3,7 @@
# Flask variables
FLASK_APP=app
FLASK_RUN_HOST=0.0.0.0
FLASK_ENV=development
FLASK_DEBUG=
SECRET_KEY=
DATABASE_URL=sqlite:///db.sqlite


+ 1
- 0
README.md Parādīt failu

@@ -4,6 +4,7 @@ The online toolkit will build on this review of tools to present a resource for

For creating database and user in production:

`docker-compose exec -it db mysql -u root -p`
`CREATE DATABASE toolkit;`
`CREATE USER 'flask'@'%' IDENTIFIED BY '[PASSWORD]';`
`GRANT CREATE, INSERT, UPDATE, SELECT, DELETE ON toolkit.* TO 'flask'@'%';`

+ 1
- 0
web/app/auth.py Parādīt failu

@@ -36,6 +36,7 @@ def login_post():

# if the above check passes, then we know the user has the right credentials
login_user(user, remember=remember)
flash(url_for('main.profile',_external=True))
return redirect(url_for('main.profile',_external=True))

# routes for signup page

Notiek ielāde…
Atcelt
Saglabāt