bbbb
This commit is contained in:
parent
f035294298
commit
b10ef72021
3 changed files with 10 additions and 8 deletions
|
@ -1,9 +1,10 @@
|
||||||
from os import environ
|
from os import environ, listdir
|
||||||
import re
|
import re
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from json import loads
|
from json import loads
|
||||||
|
|
||||||
SITE = environ.get("DOMAIN", '').strip()
|
SITE = environ.get("DOMAIN", '').strip()
|
||||||
|
SITE_NAME = environ.get("SITE_NAME", '').strip()
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
@ -766,3 +767,5 @@ NOTIFIED_USERS = {
|
||||||
'dong': FARTBINN_ID,
|
'dong': FARTBINN_ID,
|
||||||
'kippy': KIPPY_ID,
|
'kippy': KIPPY_ID,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
num_banners = len(listdir('files/assets/images/Drama/banners')) + 1
|
|
@ -1,9 +1,7 @@
|
||||||
from files.__main__ import app
|
from files.__main__ import app
|
||||||
from .get import *
|
from .get import *
|
||||||
from os import listdir, environ
|
from files.helpers import const
|
||||||
|
|
||||||
num_banners = len(listdir('files/assets/images/Drama/banners')) + 1
|
|
||||||
SITE_NAME = environ.get("SITE_NAME", '').strip()
|
|
||||||
|
|
||||||
@app.template_filter("full_link")
|
@app.template_filter("full_link")
|
||||||
def full_link(url):
|
def full_link(url):
|
||||||
|
@ -28,4 +26,5 @@ def post_embed(id, v):
|
||||||
|
|
||||||
@app.context_processor
|
@app.context_processor
|
||||||
def inject_constants():
|
def inject_constants():
|
||||||
return {"num_banners":num_banners, "environ":environ, "SITE_NAME":SITE_NAME}
|
constants = [c for c in dir(const) if not c.startswith("_")]
|
||||||
|
return {c:getattr(const, c) for c in constants}
|
|
@ -16,7 +16,7 @@ site = environ.get("DOMAIN").strip()
|
||||||
|
|
||||||
beams_client = PushNotifications(instance_id=PUSHER_INSTANCE_ID, secret_key=PUSHER_KEY)
|
beams_client = PushNotifications(instance_id=PUSHER_INSTANCE_ID, secret_key=PUSHER_KEY)
|
||||||
|
|
||||||
if True:
|
if site == 'rdrama.net':
|
||||||
topmakers = {}
|
topmakers = {}
|
||||||
for k, val in marseys.items():
|
for k, val in marseys.items():
|
||||||
if val in topmakers: topmakers[val] += 1
|
if val in topmakers: topmakers[val] += 1
|
||||||
|
@ -330,7 +330,7 @@ def leaderboard(v):
|
||||||
for user in users11: users12.append((user, badges[user.id]))
|
for user in users11: users12.append((user, badges[user.id]))
|
||||||
users12 = sorted(users12, key=lambda x: x[1], reverse=True)[:25]
|
users12 = sorted(users12, key=lambda x: x[1], reverse=True)[:25]
|
||||||
|
|
||||||
if True: users13 = topmakers
|
if request.host == 'rdrama.net': users13 = topmakers
|
||||||
else: users13 = None
|
else: users13 = None
|
||||||
|
|
||||||
votes1 = g.db.query(Vote.user_id, func.count(Vote.user_id)).filter(Vote.vote_type==1).group_by(Vote.user_id).order_by(func.count(Vote.user_id).desc()).all()
|
votes1 = g.db.query(Vote.user_id, func.count(Vote.user_id)).filter(Vote.vote_type==1).group_by(Vote.user_id).order_by(func.count(Vote.user_id).desc()).all()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue