Skip to content
Snippets Groups Projects
Commit 64e35e04 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Update notification model

parent 787cad04
No related branches found
No related tags found
1 merge request!86Merge school-apps
# Generated by Django 2.0.3 on 2018-04-12 09:24
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='notification',
name='to',
),
]
# Generated by Django 2.0.3 on 2018-04-12 09:28
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('dashboard', '0002_remove_notification_to'),
]
operations = [
migrations.AddField(
model_name='notification',
name='user',
field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
]
......@@ -24,8 +24,8 @@ class Activity(models.Model):
class Notification(models.Model):
to = models.ManyToManyField(User, related_name='notifications')
#to = models.ManyToManyField(User, related_name='notifications')
user = models.ForeignKey(User, on_delete=models.CASCADE, default=get_default_user())
title = models.CharField(max_length=200)
description = models.TextField(max_length=500)
......@@ -35,3 +35,5 @@ class Notification(models.Model):
def __str__(self):
return self.title
#def register_notification()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment