Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a link to
/usertraffic
instead of gauge
Refs #395
- Loading branch information
1 parent
53f0201
commit 6f8f3a9
Showing
3 changed files
with
16 additions
and
0 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
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,6 +1,15 @@ | ||
from collections import namedtuple | ||
|
||
from flask import request | ||
from flask_login import current_user | ||
|
||
from sipa.backends import backends | ||
|
||
TransactionTuple = namedtuple('Transaction', ['datum', 'value']) | ||
|
||
PaymentDetails = namedtuple('PaymentDetails', 'recipient bank iban bic purpose') | ||
|
||
|
||
def should_display_traffic_data(): | ||
return ((current_user.is_authenticated and current_user.has_connection) | ||
or backends.user_from_ip(request.remote_addr) is not None ) |
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