57ac138056f8ebcc9fe02ef56bb8c512dd09ba2b
[cascardo/ema.git] / contents / models.py
1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2008 Lincoln de Sousa <lincoln@minaslivre.org>
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 2 of the
7 # License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public
15 # License along with this program; if not, write to the
16 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 # Boston, MA 02111-1307, USA.
18 from django.db import models
19 from diario.models import Entry
20
21 class Menu(models.Model):
22     title = models.CharField(max_length=200)
23     entry = models.ForeignKey(Entry)
24
25     def __str__(self):
26         return self.title
27
28 class Index(models.Model):
29     entry = models.ForeignKey(Entry)
30
31     def __str__(self):
32         return self.entry.title