1
1
from django.db import models
2
2
from django.contrib.flatpages.models import FlatPage
4
19
class Page(models.Model):
5
20
name = models.CharField(max_length = 255)
6
21
url = models.CharField(blank = True, help_text = 'This is the URL of the Page', max_length = 200)
7
22
order = models.SmallIntegerField(blank = True, null = True, help_text = 'In what order would you like your pages. Note: The first item will be the default page displayed')
8
23
flatpage = models.ForeignKey(FlatPage, blank = True, null = True, help_text = 'If you would like to use a flatpage instead of a URL. Select the page here. Note: The URL field will be ignored if this is provided')
24
category = models.ForeignKey(PageCategory, blank = True, null = True, help_text = 'This is the category you wish to have the page belong to. Note: Select default to add to main menu.')