diff --git a/drama/classes/domains.py b/drama/classes/domains.py index 694829773..0332b35c9 100644 --- a/drama/classes/domains.py +++ b/drama/classes/domains.py @@ -17,10 +17,7 @@ class Domain(Base): id = Column(Integer, primary_key=True) domain = Column(String) can_submit = Column(Boolean, default=True) - can_comment = Column(Boolean, default=True) reason = Column(Integer, default=0) - embed_function = Column(String(64)) - embed_template = Column(String(32)) @property def reason_text(self): diff --git a/drama/classes/submission.py b/drama/classes/submission.py index a5ac38748..8ad4cb908 100644 --- a/drama/classes/submission.py +++ b/drama/classes/submission.py @@ -406,9 +406,6 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing): #def award_count(self): #return len(self.awards) - @property - def embed_template(self): return f"site_embeds/{self.domain_obj.embed_template}.html" - @property def is_image(self): if self.url: return self.url.lower().endswith('.jpg') or self.url.lower().endswith('.png') or self.url.lower().endswith('.gif') or self.url.lower().endswith('.jpeg') or self.url.lower().endswith('?maxwidth=9999') or self.url.lower().endswith('?maxwidth=8888') diff --git a/drama/helpers/filters.py b/drama/helpers/filters.py index bf24a3739..e67b21348 100644 --- a/drama/helpers/filters.py +++ b/drama/helpers/filters.py @@ -31,7 +31,7 @@ def filter_comment_html(html_text): # search db for domain rules that prohibit commenting bans = [ x for x in g.db.query(Domain).filter_by( - can_comment=False).filter( + can_submit=False).filter( Domain.domain.in_( list(domain_list))).all()] diff --git a/drama/routes/admin.py b/drama/routes/admin.py index afd042771..7fca611e3 100644 --- a/drama/routes/admin.py +++ b/drama/routes/admin.py @@ -978,16 +978,12 @@ def admin_ban_domain(v): d=g.db.query(Domain).filter_by(domain=d_query).first() if d: d.can_submit=False - d.can_comment=False d.reason=reason else: d=Domain( domain=domain, can_submit=False, - can_comment=False, reason=reason, - embed_function=None, - embed_template=None ) g.db.add(d) diff --git a/drama/templates/admin/manage_domain.html b/drama/templates/admin/manage_domain.html index 631986c0c..c74af121d 100644 --- a/drama/templates/admin/manage_domain.html +++ b/drama/templates/admin/manage_domain.html @@ -17,18 +17,9 @@
{{domain.can_submit}}
-{{domain.can_comment}}
-{{domain.reason_text}}
-{{domain.embed_function}}
- -{{domain.embed_template}}
-