fixed bug on views from sfmodel loading time

This commit is contained in:
anon 2022-08-02 21:58:48 -03:00
parent 8bb1002751
commit 47520e958e
2 changed files with 14 additions and 19 deletions

View file

@ -97,17 +97,17 @@
<div class="col"> <div class="col">
<p> <p>
<i class="bx bx-user"></i> Morpheus <i class="bx bx-user"></i> Morpheus
<i class="bx bx-calendar"></i> May 11, 25 contributions > <i class="bx bx-calendar"></i> May 11, 35 contributions >
</p> </p>
</div> </div>
<div class="col"> <div class="col">
<p style="text-align: right;"> <p style="text-align: right;">
(manual update) <i class="bx bx-money"></i> Raised 10.31 of 46 XMR (manual update) <i class="bx bx-money"></i> Raised 11.01 of 46 XMR
</p> </p>
</div> </div>
</div> </div>
<div class="progress"> <div class="progress">
<div class="progress-bar bg-danger" role="progressbar" style="width: 23%; color: #ff4d21" aria-valuenow="10.31" aria-valuemin="0" aria-valuemax="46"></div> <div class="progress-bar bg-danger" role="progressbar" style="width: 24%; color: #ff4d21" aria-valuenow="11.01" aria-valuemin="0" aria-valuemax="46"></div>
</div> </div>
</div> </div>
</div> </div>
@ -135,17 +135,17 @@
<div class="col"> <div class="col">
<p> <p>
<i class="bx bx-user"></i> Morpheus <i class="bx bx-user"></i> Morpheus
<i class="bx bx-calendar"></i> May 11, 25 contributions > <i class="bx bx-calendar"></i> May 11, 35 contributions >
</p> </p>
</div> </div>
<div class="col"> <div class="col">
<p style="text-align: right;"> <p style="text-align: right;">
(manual update) <i class="bx bx-money"></i> Raised 10.31 of 46 XMR (manual update) <i class="bx bx-money"></i> Raised 11.01 of 46 XMR
</p> </p>
</div> </div>
</div> </div>
<div class="progress"> <div class="progress">
<div class="progress-bar bg-danger" role="progressbar" style="width: 23%; color: #ff4d21" aria-valuenow="10.31" aria-valuemin="0" aria-valuemax="46"></div> <div class="progress-bar bg-danger" role="progressbar" style="width: 24%; color: #ff4d21" aria-valuenow="11.01" aria-valuemin="0" aria-valuemax="46"></div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -3727,7 +3727,6 @@ def sfmodel(request):
update_visitors(False) update_visitors(False)
dt = datetime.datetime.now(timezone.utc).timestamp() dt = datetime.datetime.now(timezone.utc).timestamp()
update = False update = False
today = datetime.datetime.strftime(date.today(), '%Y-%m-%d') today = datetime.datetime.strftime(date.today(), '%Y-%m-%d')
@ -3742,23 +3741,19 @@ def sfmodel(request):
print('no need to update') print('no need to update')
update = False update = False
else: else:
print('need to update, coin has missing parameters') coin.delete()
now = datetime.datetime.now() update = True
current_time = int(now.strftime("%H"))
if current_time >= 5:
coin.delete()
#coin_aux.delete()
update = True
else:
update = False
else: else:
print('no coin found yesterday') print('no coin found yesterday - 1')
update = True update = True
except: except:
print('no coin found yesterday') print('no coin found yesterday - 2')
update = True update = True
if update: now = datetime.datetime.now()
current_time = int(now.strftime("%H"))
if update and (current_time >= 5):
print('social') print('social')
check_new_social('Bitcoin') check_new_social('Bitcoin')
check_new_social('Monero') check_new_social('Monero')