fix: author_user
This commit is contained in:
commit
0c98da1ce7
@ -11,7 +11,7 @@ class NotificationFactory(factory.django.DjangoModelFactory):
|
||||
|
||||
type = factory.Faker('text', max_nb_chars=50)
|
||||
summary = factory.Faker('paragraph', nb_sentences=3, variable_nb_sentences=True)
|
||||
author_user = factory.Faker('url')
|
||||
author = factory.Faker('url')
|
||||
user = factory.Iterator(settings.AUTH_USER_MODEL.objects.all())
|
||||
date = factory.Faker('past_datetime')
|
||||
unread = factory.Faker('boolean')
|
||||
|
20
djangoldp_notification/migrations/0005_auto_20190507_0858.py
Normal file
20
djangoldp_notification/migrations/0005_auto_20190507_0858.py
Normal file
@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11 on 2019-05-07 08:58
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('djangoldp_notification', '0004_auto_20190425_1141'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='notification',
|
||||
old_name='author_user',
|
||||
new_name='author',
|
||||
),
|
||||
]
|
@ -21,7 +21,7 @@ from django.template import loader
|
||||
|
||||
class Notification(Model):
|
||||
user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='inbox', on_delete=models.deletion.CASCADE)
|
||||
author_user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.deletion.CASCADE)
|
||||
author = LDPUrlField()
|
||||
object = LDPUrlField()
|
||||
type = models.CharField(max_length=255)
|
||||
summary = models.TextField()
|
||||
|
Loading…
Reference in New Issue
Block a user