master
Aevann1 2021-10-05 21:12:31 +02:00
parent 0ff1bde411
commit ee9774042f
3 changed files with 8 additions and 10 deletions

View File

@ -132,3 +132,6 @@ def after_request(response):
from files.routes import * from files.routes import *
shadowbanned = [x[0] for x in g.db.query(User.id).options(lazyload('*')).filter(User.shadowbanned != None).all()]

View File

@ -2,19 +2,16 @@ import re
from urllib.parse import urlencode, urlparse, parse_qs from urllib.parse import urlencode, urlparse, parse_qs
from flask import * from flask import *
from sqlalchemy import * from sqlalchemy import *
from sqlalchemy.orm import relationship, deferred, lazyload from sqlalchemy.orm import relationship, deferred
from files.helpers.lazy import lazy from files.helpers.lazy import lazy
from files.helpers.const import SLURS from files.helpers.const import SLURS
from files.__main__ import Base from files.__main__ import Base, shadowbanned
from .flags import CommentFlag from .flags import CommentFlag
from .user import User
from os import environ from os import environ
import time import time
site = environ.get("DOMAIN").strip() site = environ.get("DOMAIN").strip()
shadowbanned = [x[0] for x in g.db.query(User.id).options(lazyload('*')).filter(User.shadowbanned != None).all()]
class Comment(Base): class Comment(Base):
__tablename__ = "comments" __tablename__ = "comments"

View File

@ -1,19 +1,17 @@
from flask import render_template, g from flask import render_template
from sqlalchemy import * from sqlalchemy import *
from sqlalchemy.orm import relationship, deferred, lazyload from sqlalchemy.orm import relationship, deferred
import re, random import re, random
from urllib.parse import urlparse from urllib.parse import urlparse
from files.helpers.lazy import lazy from files.helpers.lazy import lazy
from files.helpers.const import SLURS from files.helpers.const import SLURS
from files.__main__ import Base from files.__main__ import Base, shadowbanned
from .flags import Flag from .flags import Flag
from .user import User
from os import environ from os import environ
import time import time
site = environ.get("DOMAIN").strip() site = environ.get("DOMAIN").strip()
site_name = environ.get("SITE_NAME").strip() site_name = environ.get("SITE_NAME").strip()
shadowbanned = [x[0] for x in g.db.query(User.id).options(lazyload('*')).filter(User.shadowbanned != None).all()]
class Submission(Base): class Submission(Base):