From a2f30bdfb699966c7e7bd02e51587d776cbb772f Mon Sep 17 00:00:00 2001 From: Jacob Rief Date: Tue, 5 May 2020 19:02:32 +0200 Subject: [PATCH] drop support for Django<1.10 --- .../migrations/0004_auto_20170411_1733.py | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/email_auth/migrations/0004_auto_20170411_1733.py b/email_auth/migrations/0004_auto_20170411_1733.py index 6ede393ca..0e894cf8d 100644 --- a/email_auth/migrations/0004_auto_20170411_1733.py +++ b/email_auth/migrations/0004_auto_20170411_1733.py @@ -2,8 +2,6 @@ # Generated by Django 1.10.7 on 2017-04-11 15:33 from __future__ import unicode_literals -from django import VERSION - from django.db import migrations, models @@ -15,20 +13,18 @@ class Migration(migrations.Migration): operations = [] - if VERSION >= (1, 10): - from django.contrib.auth import validators - from django.utils import six - - operations.append( - migrations.AlterField( - model_name='user', - name='username', - field=models.CharField( - error_messages={'unique': 'A user with that username already exists.'}, - help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', - max_length=150, - unique=True, - validators=[validators.UnicodeUsernameValidator() if six.PY3 else validators.ASCIIUsernameValidator()], - verbose_name='username'), - ) + from django.contrib.auth import validators + + operations.append( + migrations.AlterField( + model_name='user', + name='username', + field=models.CharField( + error_messages={'unique': 'A user with that username already exists.'}, + help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', + max_length=150, + unique=True, + validators=[validators.UnicodeUsernameValidator()], + verbose_name='username'), ) + )