Commit e45fc349 authored by Administrator's avatar Administrator

[FIX] Node_link.json for Explorer working again.

parent 2fbda243
......@@ -129,8 +129,9 @@ def create_cooc(user=None, corpus_id=None, whitelist=None, size=150, year_start=
score DESC
LIMIT
%d
""" % (cooc.id, corpus.id, whitelist.id, whitelist.id, size)
""" % (cooc.id, corpus_id, whitelist.id, whitelist.id, size)
print(query_cooc)
cursor.execute(query_cooc)
return cooc.id
......
......@@ -135,6 +135,7 @@ class ModelCache(dict):
self.preload()
def __missing__(self, key):
print(key)
conditions = [
(column == str(key))
for column in self._columns
......
......@@ -10,7 +10,6 @@
from node.models import *
import pycountry
for language in pycountry.languages:
......@@ -153,3 +152,4 @@ except:
......@@ -55,6 +55,8 @@ class ResourceType(models.Model):
class Tag(models.Model):
name = models.CharField(max_length=4, unique=True)
description = models.CharField(max_length=255, unique=True)
def __str__(self):
return self.name
class Ngram(models.Model):
......@@ -73,7 +75,6 @@ class NgramTag(models.Model):
def __str__(self):
return "%s: %s" % (self.ngram.terms, self.tag.name)
class NgramLanguage(models.Model):
ngram = models.ForeignKey(Ngram, on_delete=models.CASCADE)
language = models.ForeignKey(Language)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment