Commits

Alexander Solovyov committed 95959e9

better re for domain

  • Participants
  • Parent commits a1adf29

Comments (0)

Files changed (1)

apps/blog/management/__init__.py

 
 from lib.helpers import signals
 
-RE_VALID_DOMAIN = re.compile('[\w\.]+$')
+RE_VALID_DOMAIN = re.compile(r'([A-Z0-9]([A-Z0-9-]{0,61}[A-Z0-9])?\.)+[A-Z]{2,6}')
 
 @signals.post_syncdb(sender=site_app)
 def create_site_interactively(app, created_models, verbosity, **kwargs):