-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from rafaelpezzuto/refact-and-add-tsv
Refatora código e adiciona renderizador TSV
- Loading branch information
Showing
22 changed files
with
957 additions
and
574 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ build | |
dist | ||
*.egg-info | ||
Pipfile | ||
*.pyc | ||
launch.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
from pyramid.config import Configurator | ||
from sqlalchemy import engine_from_config | ||
from os import environ | ||
from .models import DBSession, Base | ||
from api.models.sql_automap import DBSession, Base | ||
|
||
|
||
def main(global_config, **settings): | ||
sqlalchemy_url_value = environ.get('MARIADB_STRING_CONNECTION', 'mysql://root:[email protected]:3306/matomo') | ||
sqlalchemy_url_value = environ.get('STR_CONNECTION', 'mysql://root:[email protected]:3306/matomo') | ||
settings.update({'sqlalchemy.url': sqlalchemy_url_value}) | ||
|
||
application_url_value = environ.get('APPLICATION_URL', 'http://127.0.0.1:6543') | ||
|
@@ -17,6 +17,8 @@ def main(global_config, **settings): | |
DBSession.configure(bind=engine) | ||
Base.metadata.bind = engine | ||
|
||
config.add_renderer('tsv', 'api.renderers.TSVRenderer') | ||
|
||
config.add_route('home', '/') | ||
config.add_route('status', '/status') | ||
config.add_route('members', '/members') | ||
|
Oops, something went wrong.