--- a/web/hdabo/models.py Fri May 27 18:20:22 2011 +0200
+++ b/web/hdabo/models.py Mon May 30 11:21:05 2011 +0200
@@ -68,10 +68,25 @@
return unicode(self.label)
class Tag(models.Model):
+ TAG_URL_STATUS_CHOICES = (
+ (0,"match"),
+ (1,"redirection"),
+ (2,"homonyme"),
+ (3,"null_result"),
+ )
+
+ TAG_URL_STATUS_DICT = {
+ "match":0,
+ "redirection":1,
+ "homonyme":2,
+ "null_result":3,
+ }
+
label = models.CharField(max_length=1024, unique=True, blank=False, null=False)
original_label = models.CharField(max_length=1024, unique=False, blank=True, null=True, editable=False)
alias = models.CharField(max_length=1024, unique=False, blank=True, null=True)
wikipedia_url = models.URLField(verify_exists=False, max_length=512, blank=True, null=True)
+ url_status = models.IntegerField(choices=TAG_URL_STATUS_CHOICES, blank=True, null=True, default=None)
dbpedia_uri = models.URLField(verify_exists=False, max_length=512, blank=True, null=True)
wikipedia_activated = models.BooleanField(default=False)
@@ -192,4 +207,6 @@
order = models.IntegerField(default=0)
index_note = models.FloatField(default=0.0)
categories = models.ManyToManyField(TagCategory)
+
+
\ No newline at end of file