Commit 3ef9f1fe authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Merge branch 'feature/pushnotification-device-language' into 'master'

Add language field to Device model and make verbose names lowercase

See merge request !620
parents 4140eac1 96051158
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-11-03 15:58
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('pushnotifications', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='device',
name='language',
field=models.CharField(choices=[('en', 'English'), ('nl', 'Dutch')], default='nl', max_length=2, verbose_name='language'),
preserve_default=False,
),
migrations.AlterField(
model_name='device',
name='active',
field=models.BooleanField(default=True, help_text='Inactive devices will not be sent notifications', verbose_name='active'),
),
migrations.AlterField(
model_name='device',
name='date_created',
field=models.DateTimeField(auto_now_add=True, verbose_name='registration date'),
),
migrations.AlterField(
model_name='device',
name='registration_id',
field=models.TextField(verbose_name='registration token'),
),
]
......@@ -14,16 +14,21 @@ class Device(models.Model):
('android', 'Android')
)
registration_id = models.TextField(verbose_name=_("Registration token"))
registration_id = models.TextField(verbose_name=_("registration token"))
type = models.CharField(choices=DEVICE_TYPES, max_length=10)
active = models.BooleanField(
verbose_name=_("Is active"), default=True,
verbose_name=_("active"), default=True,
help_text=_("Inactive devices will not be sent notifications")
)
user = models.ForeignKey(django_settings.AUTH_USER_MODEL,
blank=False, null=False)
date_created = models.DateTimeField(
verbose_name=_("Registration date"), auto_now_add=True, null=False
verbose_name=_("registration date"), auto_now_add=True, null=False
)
language = models.CharField(
verbose_name=_('language'),
max_length=2,
choices=settings.LANGUAGES,
)
class Meta:
......
Supports Markdown
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