Guest User

Untitled

a guest
Sep 27th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.68 KB | None | 0 0
  1. from re import compile
  2. import zipfile
  3.  
  4. from django import forms
  5. from django.conf import settings
  6.  
  7. from django.core.validators import RegexValidator
  8. from django.forms.fields import CharField
  9. from django.utils.translation import ugettext_lazy as _
  10. # from captcha.fields import CaptchaField, CaptchaTextInput
  11. from captcha.fields import CaptchaField
  12. from nocaptcha_recaptcha.fields import NoReCaptchaField
  13. SIMPLE_ANSWER = 22
  14. SIMPLE_QUESTION = _('What is 9 + 13? (security question -just so we know you\'re not a bot)')
  15.  
  16. slug_re = compile(r'^[-\w\/]+$')
  17. validate_slug = RegexValidator(slug_re, _(u"Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens."), 'invalid')
Advertisement
Add Comment
Please, Sign In to add comment