Skip to content

Commit

Permalink
fix: move secret key to config file (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
drahamim authored Dec 26, 2022
1 parent fe97bb0 commit 6c5144a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,4 @@ database.db

.DS_Store

config.toml
4 changes: 2 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import sqlite3
from flask import Flask
from flask import render_template, request, url_for, flash, redirect, abort

import toml

app = Flask(__name__)
app.config['SECRET_KEY'] = 'secretkey'
app.config.from_file("config.toml", load=toml.load)


def get_db_connection():
Expand Down
9 changes: 9 additions & 0 deletions example.config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[default]
SECRET_KEY = "SomethingNEAT"





[development]
SECRET_KEY = "Pl3453Ch4ng3"

0 comments on commit 6c5144a

Please sign in to comment.