| author | cavaliet |
| Fri, 10 Jun 2011 16:43:38 +0200 | |
| changeset 18 | 65b887db0ff3 |
| parent 15 | a9136d8f0b4a |
| child 20 | 2f9a63a83002 |
| permissions | -rw-r--r-- |
| 0 | 1 |
# -*- coding: utf-8 -*- |
2 |
||
3 |
from django.contrib.auth.models import User |
|
4 |
from django.db import models |
|
5 |
from hdabo.utils import Property |
|
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
6 |
from hdabo.fields import SortedManyToManyField |
| 0 | 7 |
import datetime |
8 |
||
9 |
class Organisation(models.Model): |
|
10 |
hda_id = models.CharField(max_length=512, unique=True, blank=False, null=False) |
|
11 |
name = models.CharField(max_length=512, unique=False, blank=False, null=False) |
|
12 |
location = models.CharField(max_length=512, unique=False, blank=True, null=True) |
|
13 |
website = models.CharField(max_length=1024, unique=False, blank=True, null=True) |
|
14 |
||
15 |
||
16 |
class Author(models.Model): |
|
17 |
hda_id = models.CharField(max_length=512, unique=True, blank=False, null=False) |
|
18 |
lastname = models.CharField(max_length=512, unique=False, blank=True, null=True) |
|
19 |
firstname = models.CharField(max_length=512, unique=False, blank=True, null=True) |
|
20 |
||
21 |
class TimePeriod(models.Model): |
|
22 |
TIME_PERIOD_CHOICES = ( |
|
23 |
(1,u'Primaire'), |
|
24 |
(2,u'Collège'), |
|
25 |
(3,u'Lycée'), |
|
26 |
) |
|
27 |
TIME_PERIOD_DICT = { |
|
28 |
u'Primaire': 1, |
|
29 |
u'Collège': 2, |
|
30 |
u'Lycée': 3, |
|
31 |
} |
|
32 |
label = models.CharField(max_length=512, unique=False, blank=False, null=False) |
|
33 |
school_period = models.IntegerField(choices=TIME_PERIOD_CHOICES) |
|
34 |
||
35 |
class Meta: |
|
36 |
unique_together = ("label", "school_period") |
|
37 |
||
38 |
def __unicode__(self): |
|
39 |
return unicode(self.label) |
|
40 |
||
41 |
||
42 |
class Domain(models.Model): |
|
43 |
DOMAIN_PERIOD_CHOICES = ( |
|
44 |
(0,u'Global'), |
|
45 |
(1,u'Primaire'), |
|
46 |
(2,u'Collège'), |
|
47 |
(3,u'Lycée'), |
|
48 |
) |
|
49 |
DOMAIN_PERIOD_DICT = { |
|
50 |
u'Global': 0, |
|
51 |
u'Primaire': 1, |
|
52 |
u'Collège': 2, |
|
53 |
u'Lycée': 3, |
|
54 |
} |
|
55 |
label = models.CharField(max_length=512, unique=False, blank=False, null=False) |
|
56 |
school_period = models.IntegerField(choices=DOMAIN_PERIOD_CHOICES) |
|
57 |
||
58 |
class Meta: |
|
59 |
unique_together = ("label", "school_period") |
|
60 |
||
61 |
def __unicode__(self): |
|
62 |
return unicode(self.label) |
|
63 |
||
64 |
||
65 |
class DocumentFormat(models.Model): |
|
66 |
label = models.CharField(max_length=512, unique=True, blank=False, null=False) |
|
67 |
||
68 |
def __unicode__(self): |
|
69 |
return unicode(self.label) |
|
70 |
||
71 |
class Tag(models.Model): |
|
| 3 | 72 |
TAG_URL_STATUS_CHOICES = ( |
|
15
a9136d8f0b4a
add commant to reorder tags and query wikipedia
ymh <ymh.work@gmail.com>
parents:
11
diff
changeset
|
73 |
(0,"null_result"), |
| 3 | 74 |
(1,"redirection"), |
75 |
(2,"homonyme"), |
|
|
15
a9136d8f0b4a
add commant to reorder tags and query wikipedia
ymh <ymh.work@gmail.com>
parents:
11
diff
changeset
|
76 |
(3,"match"), |
| 3 | 77 |
) |
78 |
||
79 |
TAG_URL_STATUS_DICT = { |
|
|
15
a9136d8f0b4a
add commant to reorder tags and query wikipedia
ymh <ymh.work@gmail.com>
parents:
11
diff
changeset
|
80 |
"null_result":0, |
| 3 | 81 |
"redirection":1, |
82 |
"homonyme":2, |
|
|
15
a9136d8f0b4a
add commant to reorder tags and query wikipedia
ymh <ymh.work@gmail.com>
parents:
11
diff
changeset
|
83 |
"match":3, |
| 3 | 84 |
} |
85 |
||
| 0 | 86 |
label = models.CharField(max_length=1024, unique=True, blank=False, null=False) |
87 |
original_label = models.CharField(max_length=1024, unique=False, blank=True, null=True, editable=False) |
|
88 |
alias = models.CharField(max_length=1024, unique=False, blank=True, null=True) |
|
89 |
wikipedia_url = models.URLField(verify_exists=False, max_length=512, blank=True, null=True) |
|
|
15
a9136d8f0b4a
add commant to reorder tags and query wikipedia
ymh <ymh.work@gmail.com>
parents:
11
diff
changeset
|
90 |
wikipedia_pageid = models.BigIntegerField(unique=False, blank=True, null=True) |
| 3 | 91 |
url_status = models.IntegerField(choices=TAG_URL_STATUS_CHOICES, blank=True, null=True, default=None) |
| 0 | 92 |
dbpedia_uri = models.URLField(verify_exists=False, max_length=512, blank=True, null=True) |
93 |
wikipedia_activated = models.BooleanField(default=False) |
|
94 |
||
|
18
65b887db0ff3
Set good css style for status link. Add png for link calling wikipedia search.
cavaliet
parents:
15
diff
changeset
|
95 |
@Property |
|
65b887db0ff3
Set good css style for status link. Add png for link calling wikipedia search.
cavaliet
parents:
15
diff
changeset
|
96 |
def url_status_text(): #@NoSelf |
|
65b887db0ff3
Set good css style for status link. Add png for link calling wikipedia search.
cavaliet
parents:
15
diff
changeset
|
97 |
def fget(self): |
|
65b887db0ff3
Set good css style for status link. Add png for link calling wikipedia search.
cavaliet
parents:
15
diff
changeset
|
98 |
return self.TAG_URL_STATUS_CHOICES[self.url_status][1] |
|
65b887db0ff3
Set good css style for status link. Add png for link calling wikipedia search.
cavaliet
parents:
15
diff
changeset
|
99 |
|
|
65b887db0ff3
Set good css style for status link. Add png for link calling wikipedia search.
cavaliet
parents:
15
diff
changeset
|
100 |
return locals() |
|
65b887db0ff3
Set good css style for status link. Add png for link calling wikipedia search.
cavaliet
parents:
15
diff
changeset
|
101 |
|
| 0 | 102 |
|
103 |
class TagCategory(models.Model): |
|
104 |
label = models.CharField(max_length=512, unique=True, blank=False, null=False) |
|
105 |
||
106 |
def __unicode__(self): |
|
107 |
return unicode(self.label) |
|
108 |
||
109 |
class Location(models.Model): |
|
110 |
name = models.CharField(max_length=512, unique=False, blank=False, null=False) |
|
111 |
insee = models.CharField(max_length=5, unique=True, blank=False, null=False) |
|
112 |
||
113 |
def __unicode__(self): |
|
114 |
return unicode("%s : %s"%(self.name, self.insee)) |
|
115 |
||
116 |
class Datasheet(models.Model): |
|
117 |
hda_id = models.CharField(max_length=512, unique=True, blank=False, null=False) |
|
118 |
author = models.ForeignKey(Author, null=True, blank=True) |
|
119 |
organisation = models.ForeignKey(Organisation) |
|
120 |
title = models.CharField(max_length=2048, unique=False, blank=False, null=False) |
|
121 |
description = models.TextField(blank=True, null=True) |
|
122 |
url = models.URLField(verify_exists=False, max_length=512, blank=True, null=True) |
|
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
123 |
domains = SortedManyToManyField(Domain, limit_choices_to={'school_period':Domain.DOMAIN_PERIOD_DICT[u'Global']}, related_name="datasheets") |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
124 |
primary_periods = SortedManyToManyField(TimePeriod, limit_choices_to={'school_period':TimePeriod.TIME_PERIOD_DICT[u'Primaire']}, related_name="primary_periods_datasheets") |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
125 |
college_periods = SortedManyToManyField(TimePeriod, limit_choices_to={'school_period':TimePeriod.TIME_PERIOD_DICT[u'Collège']}, related_name="college_periods_datasheets") |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
126 |
highschool_periods = SortedManyToManyField(TimePeriod, limit_choices_to={'school_period':TimePeriod.TIME_PERIOD_DICT[u'Lycée']}, related_name="highschool_periods_datasheets") |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
127 |
primary_themes = SortedManyToManyField(Domain, limit_choices_to={'school_period':Domain.DOMAIN_PERIOD_DICT[u'Primaire']}, related_name="primary_themes_datasheets") |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
128 |
college_themes = SortedManyToManyField(Domain, limit_choices_to={'school_period':Domain.DOMAIN_PERIOD_DICT[u'Collège']}, related_name="college_themes_datasheets") |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
129 |
highschool_themes = SortedManyToManyField(Domain, limit_choices_to={'school_period':Domain.DOMAIN_PERIOD_DICT[u'Lycée']}, related_name="highschool_themes_datasheets") |
| 0 | 130 |
town = models.ForeignKey(Location, null=True, blank=True) |
131 |
format = models.ForeignKey(DocumentFormat, null=True, blank=True) |
|
132 |
original_creation_date = models.DateField() |
|
133 |
original_modification_date = models.DateField() |
|
134 |
modification_datetime = models.DateTimeField(auto_now=True) |
|
| 2 | 135 |
validation_date = models.DateTimeField(null=True, blank=True) |
136 |
validated = models.BooleanField(default=False) |
|
137 |
validator = models.ForeignKey(User, null=True, blank=True) |
|
| 0 | 138 |
tags = models.ManyToManyField(Tag, through='TaggedSheet') |
139 |
||
140 |
||
141 |
def validate(self, user): |
|
142 |
self.validation_date = datetime.datetime.now() |
|
143 |
self.validated = True |
|
144 |
self.validator = user |
|
145 |
self.save() |
|
146 |
||
147 |
def unvalidate(self): |
|
148 |
self.validation_date = datetime.datetime.min |
|
149 |
self.validated = False |
|
150 |
self.validator = None |
|
151 |
self.save() |
|
152 |
||
153 |
@Property |
|
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
154 |
def domains_list(): #@NoSelf |
| 0 | 155 |
def fget(self): |
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
156 |
return [d.label for d in self.domains.all()] |
| 0 | 157 |
|
158 |
return locals() |
|
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
159 |
|
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
160 |
@Property |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
161 |
def domains_text(): #@NoSelf |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
162 |
def fget(self): |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
163 |
return "; ".join(self.domains_list) |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
164 |
|
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
165 |
return locals() |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
166 |
|
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
167 |
@Property |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
168 |
def primary_periods_list(): #@NoSelf |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
169 |
def fget(self): |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
170 |
return [d.label for d in self.primary_periods.all()] |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
171 |
|
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
172 |
return locals() |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
173 |
|
| 0 | 174 |
|
175 |
@Property |
|
176 |
def primary_periods_text(): #@NoSelf |
|
177 |
def fget(self): |
|
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
178 |
return "; ".join(self.primary_periods_list) |
| 0 | 179 |
|
180 |
return locals() |
|
181 |
||
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
182 |
@Property |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
183 |
def college_periods_list(): #@NoSelf |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
184 |
def fget(self): |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
185 |
return [d.label for d in self.college_periods.all()] |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
186 |
|
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
187 |
return locals() |
| 0 | 188 |
|
189 |
@Property |
|
190 |
def college_periods_text(): #@NoSelf |
|
191 |
def fget(self): |
|
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
192 |
return "; ".join(self.college_periods_list) |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
193 |
|
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
194 |
return locals() |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
195 |
|
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
196 |
@Property |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
197 |
def highschool_periods_list(): #@NoSelf |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
198 |
def fget(self): |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
199 |
return [d.label for d in self.highschool_periods.all()] |
| 0 | 200 |
|
201 |
return locals() |
|
202 |
||
203 |
@Property |
|
204 |
def highschool_periods_text(): #@NoSelf |
|
205 |
def fget(self): |
|
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
206 |
return "; ".join(self.highschool_periods_list) |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
207 |
|
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
208 |
return locals() |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
209 |
|
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
210 |
|
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
211 |
@Property |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
212 |
def primary_themes_list(): #@NoSelf |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
213 |
def fget(self): |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
214 |
return [d.label for d in self.primary_themes.all()] |
| 0 | 215 |
|
216 |
return locals() |
|
217 |
||
218 |
||
219 |
@Property |
|
220 |
def primary_themes_text(): #@NoSelf |
|
221 |
def fget(self): |
|
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
222 |
return "; ".join(self.primary_themes_list) |
| 0 | 223 |
|
224 |
return locals() |
|
225 |
||
226 |
@Property |
|
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
227 |
def college_themes_list(): #@NoSelf |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
228 |
def fget(self): |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
229 |
return [d.label for d in self.college_themes.all()] |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
230 |
|
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
231 |
return locals() |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
232 |
|
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
233 |
@Property |
| 0 | 234 |
def college_themes_text(): #@NoSelf |
235 |
def fget(self): |
|
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
236 |
return "; ".join(self.college_themes_list) |
| 0 | 237 |
|
238 |
return locals() |
|
239 |
||
240 |
@Property |
|
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
241 |
def highschool_themes_list(): #@NoSelf |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
242 |
def fget(self): |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
243 |
return [d.label for d in self.highschool_themes.all()] |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
244 |
|
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
245 |
return locals() |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
246 |
|
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
247 |
@Property |
| 0 | 248 |
def highschool_themes_text(): #@NoSelf |
249 |
def fget(self): |
|
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
250 |
return "; ".join(self.highschool_themes_list) |
| 0 | 251 |
|
252 |
return locals() |
|
253 |
||
254 |
@Property |
|
255 |
def town_text(): #@NoSelf |
|
256 |
def fget(self): |
|
257 |
return self.town.name if self.town else "" |
|
258 |
||
259 |
return locals() |
|
260 |
||
|
11
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
261 |
@Property |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
262 |
def tags_text(): #@NoSelf |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
263 |
def fget(self): |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
264 |
return "; ".join([t.label for t in self.tags.all()]) |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
265 |
|
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
266 |
return locals() |
|
143ab88d17f8
add ordered manytomany fields and indexing
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
267 |
|
| 0 | 268 |
|
269 |
class TaggedSheet(models.Model): |
|
270 |
datasheet = models.ForeignKey(Datasheet) |
|
271 |
tag = models.ForeignKey(Tag) |
|
| 2 | 272 |
original_order = models.IntegerField(default=0) |
273 |
order = models.IntegerField(default=0) |
|
274 |
index_note = models.FloatField(default=0.0) |
|
| 0 | 275 |
categories = models.ManyToManyField(TagCategory) |
| 3 | 276 |
|
277 |
||
| 0 | 278 |