flectra/doc/howtos/backend/exercise-model
2018-03-14 15:37:22 +05:30

19 lines
637 B
Plaintext

# HG changeset patch
# Parent e3bb12713a6d38c28f50d46e8c1bab74ac40c1be
Index: addons/openacademy/models.py
===================================================================
--- addons.orig/openacademy/models.py 2014-08-26 17:25:51.643783496 +0200
+++ addons/openacademy/models.py 2014-08-26 17:25:51.639783496 +0200
@@ -2,7 +2,8 @@
from flectra import models, fields, api
-# class openacademy(models.Model):
-# _name = 'openacademy.openacademy'
+class Course(models.Model):
+ _name = 'openacademy.course'
-# name = fields.Char()
+ name = fields.Char(string="Title", required=True)
+ description = fields.Text()