Move to src dir.
[edumed.git] / src / forum / models.py
diff --git a/src/forum/models.py b/src/forum/models.py
new file mode 100644 (file)
index 0000000..5ec506b
--- /dev/null
@@ -0,0 +1,11 @@
+# -*- coding: utf-8 -*-
+from django.db import models
+
+import pybb.models
+
+from catalogue.models import Lesson
+
+
+class Topic(models.Model):
+    pybb_topic = models.OneToOneField(pybb.models.Topic, primary_key=True, related_name='edumed_topic')
+    lesson = models.ForeignKey(Lesson, null=True, blank=True, related_name='forum_topics')