Read DB URL from config.
This commit is contained in:
parent
662fdcaa2b
commit
6e50f9ad74
|
@ -1,12 +1,12 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
|
from main import app
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from confarchive import database, model, wikidata
|
from confarchive import database, model, wikidata
|
||||||
|
|
||||||
DB_URL = "postgresql:///confarchive"
|
|
||||||
|
|
||||||
database.init_db(DB_URL)
|
app.config.from_object("config.default")
|
||||||
|
database.init_app(app)
|
||||||
|
|
||||||
|
|
||||||
def add_country(name: str) -> None:
|
def add_country(name: str) -> None:
|
||||||
|
|
Loading…
Reference in a new issue