From 1abe15e9abef3d609549e2a694cb821a5ae402c7 Mon Sep 17 00:00:00 2001 From: Arne Schauf Date: Sun, 29 Sep 2013 16:12:19 +0200 Subject: [PATCH] pep8 --- nsupdate/main/models.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nsupdate/main/models.py b/nsupdate/main/models.py index 17b4745..a0f937f 100644 --- a/nsupdate/main/models.py +++ b/nsupdate/main/models.py @@ -8,7 +8,10 @@ import re class BlacklistedDomain(models.Model): - domain = models.CharField(max_length=256, unique=True, help_text='Blacklisted domain. Evaluated as regex (search).') + domain = models.CharField( + max_length=256, + unique=True, + help_text='Blacklisted domain. Evaluated as regex (search).') last_update = models.DateTimeField(auto_now=True) created = models.DateTimeField(auto_now_add=True) @@ -41,7 +44,7 @@ class Host(models.Model): subdomain = models.CharField(max_length=256, validators=[ RegexValidator( regex=r'^(([a-z0-9][a-z0-9\-]*[a-z0-9])|[a-z0-9])$', - message='Invalid subdomain: only letters, digits and dashes are allowed' + message='Invalid subdomain: only "a-z", "0-9" and "-" is allowed' ), domain_blacklist_validator]) domain = models.ForeignKey(Domain)