summaryrefslogtreecommitdiff
blob: 2bc345e0bcd66b71d774de29910a7d53f41579fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Copyright 1998-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

from django.db import models

class SiteSettings(models.Model):
	SiteId = models.IntegerField(primary_key=True, db_column='site_id')
	site = models.CharField(max_length=20)
	title = models.CharField(max_length=50)
	email = models.CharField(max_length=50)
	description = models.CharField(max_length=100)
	url = models.CharField(max_length=50)
	contact = models.CharField(max_length=50)
	cdnurl = models.CharField(max_length=20)
	layout_path = models.CharField(max_length=100)
	download_url = models.CharField(max_length=100)
	class Meta:
		db_table = 'site_settings'
	def __str__(self):
		return '%s %s %s %s %s %s %s %s %s %s' % (self.SiteId, self.site, self.title, self.email, self.description, self.url, self.contact, self.cdnurl, self.layout_path, self.download_url)

class Layout(models.Model):
	LayoutId = models.IntegerField(primary_key=True, db_column='layout_id')
	layout = models.CharField(max_length=20)
	layout_file = models.CharField(max_length=20)
	class Meta:
		db_table = 'layout'
	def __str__(self):
		return '%s %s %s' % (self.LayoutId, self.layout, self.layout_file)

class Pages(models.Model):
	PageId = models.IntegerField(primary_key=True, db_column='page_id')
	nav_title = models.CharField(max_length=200)
	title = models.CharField(max_length=200)
	description = models.CharField(max_length=200)
	nav1 = models.CharField(max_length=100)
	nav1_show = models.BooleanField(default=False)
	nav1_weight = models.IntegerField(default=0)
	meta = models.CharField(max_length=200)
	url = models.CharField(max_length=200)
	inlinejs = models.CharField(max_length=200)
	body_class = models.CharField(max_length=200)
	LayoutId = models.ForeignKey(Layout, db_column='layout_id')
	SubMenu = models.BooleanField(default=False, db_column='sub_menu')
	class Meta:
		db_table = 'pages'
	def __str__(self):
		return  '%s %s %s %s %s %s %s %s %s %s %s %s %s' % (self.PageId, self.nav_title, self.title, self.description, self.nav1, self.nav1_show, self.nav1_weight, self.meta, self.url, self.inlinejs, self.body_class, self.LayoutId, self.SubMenu)

class SubPages(models.Model):
	SubPageId = models.IntegerField(primary_key=True, db_column='sub_page_id')
	nav_title = models.CharField(max_length=200)
	title = models.CharField(max_length=200)
	description = models.CharField(max_length=200)
	PageId = models.ForeignKey(Pages, db_column='page_id')
	nav2 = models.CharField(max_length=100)
	nav2_show = models.BooleanField(default=False)
	nav2_weight = models.IntegerField(default=0)
	meta = models.CharField(max_length=200)
	url = models.CharField(max_length=200)
	inlinejs = models.CharField(max_length=200)
	body_class = models.CharField(max_length=200)
	LayoutId = models.ForeignKey(Layout, db_column='layout_id')
	SubMenu = models.BooleanField(default=False, db_column='sub_menu')
	class Meta:
		db_table = 'sub_pages'
	def __str__(self):
		return  '%s %s %s %s %s %s %s %s %s %s %s %s %s %s' % (self.SubPageId, self.nav_title, self.title, self.description, self.PageId, self.nav2, self.nav2_show, self.nav2_weight, self.meta, self.url, self.inlinejs, self.body_class, self.LayoutId, self.SubMenu)

class SubSubPages(models.Model):
	SubSubPageId = models.IntegerField(primary_key=True, db_column='subsub_page_id')
	nav_title = models.CharField(max_length=200)
	title = models.CharField(max_length=200)
	description = models.CharField(max_length=200)
	SubPageId = models.ForeignKey(SubPages, db_column='sub_page_id')
	nav3 = models.CharField(max_length=100)
	nav3_show = models.BooleanField(default=False)
	nav3_weight = models.IntegerField(default=0)
	meta = models.CharField(max_length=200)
	url = models.CharField(max_length=200)
	inlinejs = models.CharField(max_length=200)
	body_class = models.CharField(max_length=200)
	LayoutId = models.ForeignKey(Layout, db_column='layout_id')
	class Meta:
		db_table = 'subsub_pages'
	def __str__(self):
		return  '%s %s %s %s %s %s %s %s %s %s %s %s %s' % (self.SubSubPageId, self.nav_title, self.title, self.description, self.SubPageId, self.nav3, self.nav3_show, self.nav3_weight, self.meta, self.url, self.inlinejs, self.body_class, self.LayoutId)

class Sponsors(models.Model):
	SponsorsId = models.IntegerField(primary_key=True, db_column='sponsors_id')
	Name = models.CharField(max_length=200, db_column='name')
	AdsName = models.CharField(max_length=200, db_column='ads_name')
	Img = models.CharField(max_length=200, db_column='img')
	AdsImg = models.CharField(max_length=200, db_column='ads_img')
	Link = models.CharField(max_length=200, db_column='link')
	AdsLink = models.CharField(max_length=200, db_column='ads_link')
	Blurb =  models.TextField(db_column='blurb')
	AdsAltName = models.CharField(max_length=200, db_column='ads_alt_name')
	Weight =  models.IntegerField(default=0, db_column='weight')
	AdsActive = models.BooleanField(default=False, db_column='ads_active')
	Active = models.BooleanField(default=False, db_column='active')
	class Meta:
		db_table = 'sponsors'
	def __str__(self):
		return '%s %s %s %s %s %s %s %s %s %s %s %s' % (self.SponsorsId, self.Name, self.AdsName, self.Img, self.AdsImg, self.Link, self.AdsLink, self.Blurb, self.AdsAltName, self.Weight,  self.AdsActive, self.Active)

class Posts(models.Model):
	PostId = models.IntegerField(primary_key=True, db_column='post_id')
	title = models.CharField(max_length=200, db_column='title')
	url = models.CharField(max_length=200, db_column='url')
	text = models.TextField(db_column='text')
	TimeStamp = models.DateTimeField(db_column='time_stamp')
	class Meta:
		db_table='posts'
	def __str__(self):
		return '%s %s %s %s %s' % (self.PostId, self.title, self.url, self.text, self.TimeStamp)

class Bugzilla(models.Model):
	Username = models.CharField(max_length=150,db_column='username')
	Bugzillaname = models.CharField(max_length=150, db_column='bugzillaname')
	class Meta:
		db_table='bugzillauser'
	def __str__(self):
		return '%s %s' % (self.Username, self.Bugzillauser)