This commit is contained in:
Martin Mahner 2011-06-10 14:34:19 +02:00
parent 4cdf648fc3
commit 259b43bc90

View file

@ -10,7 +10,7 @@ from django.utils.translation import ugettext_lazy as _
from pastebin.apps.dpaste.highlight import LEXER_DEFAULT, pygmentize from pastebin.apps.dpaste.highlight import LEXER_DEFAULT, pygmentize
t = 'abcdefghijkmnopqrstuvwwxyzABCDEFGHIJKLOMNOPQRSTUVWXYZ1234567890' t = 'abcdefghijkmnopqrstuvwwxyzABCDEFGHIJKLOMNOPQRSTUVWXYZ1234567890'
def generate_secret_id(length=3): def generate_secret_id(length=5):
return ''.join([random.choice(t) for i in range(length)]) return ''.join([random.choice(t) for i in range(length)])
class Snippet(models.Model): class Snippet(models.Model):