Missing DB fields for user questionaire

This commit is contained in:
Sebastian Lohff 2019-01-23 00:50:51 +01:00
parent a58a15984e
commit 8cc6c3cbff
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.18 on 2019-01-22 23:48
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contest', '0019_auto_20190122_2049'),
]
operations = [
migrations.AddField(
model_name='user',
name='dncall',
field=models.CharField(blank=True, default='', max_length=16),
),
migrations.AddField(
model_name='user',
name='editedProfile',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='user',
name='extra2m70cm',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='user',
name='qrv2m',
field=models.BooleanField(default=False),
),
migrations.AddField(
model_name='user',
name='qrv70cm',
field=models.BooleanField(default=False),
),
]

View File

@ -59,6 +59,13 @@ class User(AbstractUser):
# we ignore the band for them when checking QSOs
ignoreBand = models.BooleanField(default=False)
# extra profile stuff so DL7BST can sleep well without his doodles
editedProfile = models.BooleanField(default=False)
dncall = models.CharField(max_length=16, default='', blank=True)
qrv2m = models.BooleanField(default=False)
qrv70cm = models.BooleanField(default=False)
extra2m70cm = models.BooleanField(default=False)
def __init__(self, *args, **kwargs):
super(User, self).__init__(*args, **kwargs)
self._meta.get_field("username").validators = [CallUsernameValidator()]