Commit 933d8a42 authored by fred's avatar fred

update custom user model for 1.8

parent af79bfeb
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.core.validators
import django.contrib.auth.models
class Migration(migrations.Migration):
dependencies = [
('aa', '0003_auto_20160930_1258'),
]
operations = [
migrations.AlterModelManagers(
name='user',
managers=[
('objects', django.contrib.auth.models.UserManager()),
],
),
migrations.AlterField(
model_name='user',
name='email',
field=models.EmailField(max_length=254, verbose_name='email address', blank=True),
),
migrations.AlterField(
model_name='user',
name='emissions',
field=models.ManyToManyField(to='emissions.Emission', blank=True),
),
migrations.AlterField(
model_name='user',
name='groups',
field=models.ManyToManyField(related_query_name='user', related_name='user_set', to='auth.Group', blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', verbose_name='groups'),
),
migrations.AlterField(
model_name='user',
name='last_login',
field=models.DateTimeField(null=True, verbose_name='last login', blank=True),
),
migrations.AlterField(
model_name='user',
name='news_categories',
field=models.ManyToManyField(to='emissions.NewsCategory', blank=True),
),
migrations.AlterField(
model_name='user',
name='username',
field=models.CharField(error_messages={'unique': 'A user with that username already exists.'}, max_length=30, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.', 'invalid')], help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', unique=True, verbose_name='username'),
),
]
......@@ -8,8 +8,8 @@ from django.utils.translation import ugettext_lazy as _
from emissions.models import Emission, Episode, NewsItem, NewsCategory, SoundFile
class User(AbstractUser):
emissions = models.ManyToManyField(Emission, null=True, blank=True)
news_categories = models.ManyToManyField(NewsCategory, null=True, blank=True)
emissions = models.ManyToManyField(Emission, blank=True)
news_categories = models.ManyToManyField(NewsCategory, blank=True)
phone = models.CharField(_('Phone'), max_length=20, null=True, blank=True)
mobile = models.CharField(_('Mobile'), max_length=20, null=True, blank=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment