aboutsummaryrefslogtreecommitdiff
path: root/apps/accounts/signals.py
diff options
context:
space:
mode:
Diffstat (limited to 'apps/accounts/signals.py')
-rw-r--r--apps/accounts/signals.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/accounts/signals.py b/apps/accounts/signals.py
index 837a7ed..7c7f7c9 100644
--- a/apps/accounts/signals.py
+++ b/apps/accounts/signals.py
@@ -2,6 +2,7 @@ from django.db.models.signals import post_save
from django.dispatch import receiver
from .models import User, UserProfile
+from notes.models import Notebook
@receiver(post_save, sender=User)
@@ -10,3 +11,5 @@ def create_profile(sender, update_fields, created, instance, **kwargs):
if created:
user_profile = UserProfile.objects.create(user=instance)
user_profile.save()
+ user_trash_notebook = Notebook.objects.create(owner=instance, name="Trash")
+ user_trash_notebook.save()