syntax: switch from read to unread

This commit is contained in:
Matthieu Fesselier 2019-04-04 17:18:24 +07:00
parent eb1d32285e
commit 4d4b21e7e8
3 changed files with 26 additions and 2 deletions

View File

@ -13,5 +13,5 @@ class NotificationFactory(factory.django.DjangoModelFactory):
author_user = factory.Faker('url')
user = factory.Iterator(User.objects.all())
date = factory.Faker('past_datetime')
read = factory.Faker('boolean')
unread = factory.Faker('boolean')
object = factory.Faker('url')

View File

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2019-04-04 03:43
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('djangoldp_notification', '0002_auto_20190301_0418'),
]
operations = [
migrations.RemoveField(
model_name='notification',
name='read',
),
migrations.AddField(
model_name='notification',
name='unread',
field=models.BooleanField(default=True),
),
]

View File

@ -23,7 +23,7 @@ class Notification(Model):
type = models.CharField(max_length=255)
summary = models.TextField()
date = models.DateTimeField(auto_now_add=True)
read = models.BooleanField()
unread = models.BooleanField(default=True)
class Meta:
permissions = (