fix spacing and typos
This commit is contained in:
parent
795430c0ba
commit
e35c85dac4
2 changed files with 16 additions and 23 deletions
|
@ -474,10 +474,3 @@ async def get_p2pool_data(session, mini):
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ locale.setlocale(locale.LC_ALL, 'en_US.utf8')
|
||||||
# To be used when there's a problem with the API
|
# To be used when there's a problem with the API
|
||||||
@login_required
|
@login_required
|
||||||
def add_coin(request):
|
def add_coin(request):
|
||||||
if request.user.username != "Administrador" and request.user.username != "Morpheus":
|
if request.user.username != "Administrator":
|
||||||
return render(request, 'users/error.html')
|
return render(request, 'users/error.html')
|
||||||
|
|
||||||
if request.method != 'POST':
|
if request.method != 'POST':
|
||||||
|
@ -95,7 +95,7 @@ def add_coin(request):
|
||||||
# Only authorized users can download all price data via URL request
|
# Only authorized users can download all price data via URL request
|
||||||
@login_required
|
@login_required
|
||||||
def get_history(request, symbol, start_time=None, end_time=None):
|
def get_history(request, symbol, start_time=None, end_time=None):
|
||||||
if request.user.username != "Administrador" and request.user.username != "Morpheus":
|
if request.user.username != "Administrator": #and request.user.username != "Morpheus":
|
||||||
return render(request, 'users/error.html')
|
return render(request, 'users/error.html')
|
||||||
|
|
||||||
count = get_history_function(symbol, start_time, end_time)
|
count = get_history_function(symbol, start_time, end_time)
|
||||||
|
@ -113,7 +113,7 @@ def get_history(request, symbol, start_time=None, end_time=None):
|
||||||
# Only authorized users can do this
|
# Only authorized users can do this
|
||||||
@login_required
|
@login_required
|
||||||
def load_rank(request, symbol):
|
def load_rank(request, symbol):
|
||||||
if request.user.username != "Administrador" and request.user.username != "Morpheus":
|
if request.user.username != "Administrator":
|
||||||
return render(request, 'users/error.html')
|
return render(request, 'users/error.html')
|
||||||
gc = pygsheets.authorize(service_file='service_account_credentials.json')
|
gc = pygsheets.authorize(service_file='service_account_credentials.json')
|
||||||
sh = gc.open('zcash_bitcoin')
|
sh = gc.open('zcash_bitcoin')
|
||||||
|
@ -146,7 +146,7 @@ def load_rank(request, symbol):
|
||||||
# Only authorized users can do this
|
# Only authorized users can do this
|
||||||
@login_required
|
@login_required
|
||||||
def load_p2pool(request):
|
def load_p2pool(request):
|
||||||
if request.user.username != "Administrador" and request.user.username != "Morpheus":
|
if request.user.username != "Administrator":
|
||||||
return render(request, 'users/error.html')
|
return render(request, 'users/error.html')
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
|
@ -199,7 +199,7 @@ def load_p2pool(request):
|
||||||
# Only authorized users can do this
|
# Only authorized users can do this
|
||||||
@login_required
|
@login_required
|
||||||
def load_dominance(request, symbol):
|
def load_dominance(request, symbol):
|
||||||
if request.user.username != "Administrador" and request.user.username != "Morpheus":
|
if request.user.username != "Administrator":
|
||||||
return render(request, 'users/error.html')
|
return render(request, 'users/error.html')
|
||||||
gc = pygsheets.authorize(service_file='service_account_credentials.json')
|
gc = pygsheets.authorize(service_file='service_account_credentials.json')
|
||||||
sh = gc.open('zcash_bitcoin')
|
sh = gc.open('zcash_bitcoin')
|
||||||
|
@ -231,7 +231,7 @@ def load_dominance(request, symbol):
|
||||||
# Only authorized users can do this
|
# Only authorized users can do this
|
||||||
@login_required
|
@login_required
|
||||||
def importer(request):
|
def importer(request):
|
||||||
if request.user.username != "Administrador" and request.user.username != "Morpheus":
|
if request.user.username != "Administrator":
|
||||||
return render(request, 'users/error.html')
|
return render(request, 'users/error.html')
|
||||||
count = 0
|
count = 0
|
||||||
Social.objects.all().delete()
|
Social.objects.all().delete()
|
||||||
|
@ -288,7 +288,7 @@ def importer(request):
|
||||||
# Only authorized users can do this
|
# Only authorized users can do this
|
||||||
@login_required
|
@login_required
|
||||||
def reset(request, symbol):
|
def reset(request, symbol):
|
||||||
if request.user.username != "Administrador" and request.user.username != "Morpheus":
|
if request.user.username != "Administrator":
|
||||||
return render(request, 'users/error.html')
|
return render(request, 'users/error.html')
|
||||||
Coin.objects.filter(name=symbol).all().delete()
|
Coin.objects.filter(name=symbol).all().delete()
|
||||||
|
|
||||||
|
@ -300,7 +300,7 @@ def reset(request, symbol):
|
||||||
# Only authorized users can do this
|
# Only authorized users can do this
|
||||||
@login_required
|
@login_required
|
||||||
def populate_database(request):
|
def populate_database(request):
|
||||||
if request.user.username != "Administrador" and request.user.username != "Morpheus":
|
if request.user.username != "Administrator":
|
||||||
return render(request, 'users/error.html')
|
return render(request, 'users/error.html')
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
|
@ -754,7 +754,7 @@ def populate_database(request):
|
||||||
# Only authorized users can do this
|
# Only authorized users can do this
|
||||||
@login_required
|
@login_required
|
||||||
def update_database_admin(request, date_from, date_to):
|
def update_database_admin(request, date_from, date_to):
|
||||||
if request.user.username != "Administrador" and request.user.username != "Morpheus":
|
if request.user.username != "Administrator":
|
||||||
return render(request, 'users/error.html')
|
return render(request, 'users/error.html')
|
||||||
|
|
||||||
synchronous.update_database(date_from, date_to)
|
synchronous.update_database(date_from, date_to)
|
||||||
|
@ -762,7 +762,7 @@ def update_database_admin(request, date_from, date_to):
|
||||||
message = 'Database updated from ' + str(date_from) + ' to ' + str(date_to)
|
message = 'Database updated from ' + str(date_from) + ' to ' + str(date_to)
|
||||||
context = {'message': message}
|
context = {'message': message}
|
||||||
return render(request, 'charts/maintenance.html', context)
|
return render(request, 'charts/maintenance.html', context)
|
||||||
if request.user.username != "Administrador" and request.user.username != "Morpheus":
|
if request.user.username != "Administrator":
|
||||||
return render(request, 'users/error.html')
|
return render(request, 'users/error.html')
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue