fusionner
authorcavaliet
Mon, 30 May 2011 11:41:17 +0200
changeset 6 5e5f250be34d
parent 5 9aca3c15fbff (current diff)
parent 3 03ceed56255b (diff)
child 7 b5204be88f8e
fusionner
--- a/web/hdabo/models.py	Fri May 27 18:28:58 2011 +0200
+++ b/web/hdabo/models.py	Mon May 30 11:41:17 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