Various bugfixes
This commit is contained in:
parent
26c02df53d
commit
6f158638bf
4 changed files with 20 additions and 3 deletions
4
communication/apps.py
Normal file
4
communication/apps.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
class CommunicationConfig(AppConfig):
|
||||
name = 'communication'
|
|
@ -1,5 +1,6 @@
|
|||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
||||
class Notifying(models.Model):
|
||||
|
@ -14,8 +15,14 @@ class Notifying(models.Model):
|
|||
|
||||
|
||||
class Notification(models.Model):
|
||||
sent_by = models.ForeignKey(Notifying)
|
||||
about = models.ForeignKey(Notifying)
|
||||
sent_by = models.ForeignKey(
|
||||
Notifying,
|
||||
related_name="notifs_sent"
|
||||
)
|
||||
about = models.ForeignKey(
|
||||
Notifying,
|
||||
related_name="notifs",
|
||||
)
|
||||
to = models.ForeignKey(
|
||||
User,
|
||||
verbose_name=_("envoyée à")
|
||||
|
@ -32,7 +39,7 @@ class Commentable(Notifying):
|
|||
|
||||
|
||||
class Thread(models.Model):
|
||||
topic = models.OneToOne(Commentable)
|
||||
topic = models.OneToOneField(Commentable)
|
||||
|
||||
|
||||
class Comment(models.Model):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue