added lodgeit.wsgi file
This commit is contained in:
parent
cde440c798
commit
a0794b8bce
9
lodgeit.wsgi
Normal file
9
lodgeit.wsgi
Normal file
@ -0,0 +1,9 @@
|
||||
# Example lodgeit file
|
||||
from lodgeit import make_app
|
||||
|
||||
application = make_app(
|
||||
# the path to the database
|
||||
dburi='sqlite:////path/to/lodgeit.db',
|
||||
# generate with os.urandom(30)
|
||||
secret_key='\x05\x82bgI\x99\xaay\xa5o\xef\xac\xa1\x93>Db\x04\xf1\x8b|\x7fT\x87|]LcM\x9d'
|
||||
)
|
@ -34,9 +34,10 @@ class AntiSpam(object):
|
||||
"""
|
||||
|
||||
def check_for_link_spam(self, code):
|
||||
"""It's spam if more than 30% of the text are links."""
|
||||
lengths = (x.span() for x in LINK_RE.finditer(code))
|
||||
return percentize(sum(i[1]-i[0] for i in lengths),
|
||||
len(code)) > 50
|
||||
len(code)) > 30
|
||||
|
||||
def is_spam(self, code):
|
||||
"""Check if one of the fields provides contains spam."""
|
||||
|
Loading…
Reference in New Issue
Block a user