~kenneth-arnold/openmind-commons/xxx

« back to all changes in this revision

Viewing changes to apps/commonsense/views.py

  • Committer: Kenneth Arnold
  • Date: 2009-05-13 04:28:05 UTC
  • Revision ID: kenneth.arnold@gmail.com-20090513042805-o6eyqyg40jzptwvv
Lattice incremental.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
                            grouped_assertions=grouped_assertions,
58
58
                        ))
59
59
 
 
60
def feature(request, lang, lr, relation_name, concept_name):
 
61
    language = get_language(lang)
 
62
    concept = Concept.objects.get(concept_name, language)
 
63
    relation = Relation.get(relation_name)
 
64
    cls = {'left': LeftFeature, 'right': RightFeature}[lr]
 
65
    feature = cls(relation, concept)
 
66
    return respond_with('commonsense/feature.html', request, dict(
 
67
            feature = feature))
 
68
 
60
69
def assertion(request, lang, assertion_id):
61
70
    language = get_language(lang)
62
71
    the_assertion = get_object_or_404(Assertion.objects, pk=int(assertion_id))