Increase length of max subreddit name in validator

"internationalpolitics" is longer than 20 chars
This commit is contained in:
shlurbee
2012-04-30 15:31:43 -07:00
committed by Max Goodman
parent 70a7f311ee
commit 8cd3cc3c42
2 changed files with 2 additions and 4 deletions

View File

@@ -421,7 +421,7 @@ class VCssMeasure(Validator):
def run(self, value):
return value if value and self.measure.match(value) else ''
subreddit_rx = re.compile(r"\A[A-Za-z0-9][A-Za-z0-9_]{2,%s}\Z" % Subreddit.MAX_SRNAME_LENGTH)
subreddit_rx = re.compile(r"\A[A-Za-z0-9][A-Za-z0-9_]{2,20}\Z")
def chksrname(x):
#notice the space before reddit.com

View File

@@ -86,9 +86,7 @@ class Subreddit(Thing, Printable):
gold_limit = 100
DEFAULT_LIMIT = object()
# Note: this value can increase but should never go down or it won't match
# names already in the db
MAX_SRNAME_LENGTH = 20
MAX_SRNAME_LENGTH = 200 # must be less than max memcached key length
# note: for purposely unrenderable reddits (like promos) set author_id = -1
@classmethod