Skip to content

API Documentation

Alexander Makeev edited this page May 24, 2013 · 2 revisions

<< Back

Access to configuration

To access configuration from any django view function use request.configuration object:

def script(request):
    cfg = request.configuration

The source code could be found here: graph_db/configuration.py

Configuration API

Configuration object has following attributes and methods:

Attributes

classes - a dictionary, keys are integer classes ids, values are classes description dictionaries. Example:

classes = { 
           1 : {
                "type" : "entity_class",
                "name" : "class1",
                "readable_name" : "Class 1",
                "description" : "Class one description",
                "attributes" : [...],
               }
          }

cnames_to_cids - a dictionary, keys are string names of classes, values are integer classes ids.

Methods

Clone this wiki locally