Skip to content

Commit

Permalink
added gui and first query test
Browse files Browse the repository at this point in the history
  • Loading branch information
jason authored and jason committed Jul 13, 2012
1 parent 432719b commit ae0f4d5
Show file tree
Hide file tree
Showing 13 changed files with 12,818 additions and 2 deletions.
2 changes: 1 addition & 1 deletion anta/sync.py
Expand Up @@ -22,7 +22,7 @@ def sync( options, parser ):
print "[sync] corpsu path:", path
print "[sync] path exists:", os.path.exists( path )
print "[sync] autoformat:", options.autoformat
options.autoformat = True
# options.autoformat = True

if not os.path.exists( path ):
error( message="path created using corpus name does not exist!", parser=parser )
Expand Down
Empty file added gui/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions gui/models.py
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
27 changes: 27 additions & 0 deletions gui/static/js/api_sven.js
@@ -0,0 +1,27 @@
var svenjs = svenjs || {};

//TODO: use a more robust pattern for object creation
svenjs.Sven = function(url){

this.url = url;
return this;

};

/* query function */
svenjs.Sven.prototype.query = function(successCallback){

//var url = this.url + "/sketch/query/" + this.database + "/" + collection + "/" + command + "/";
var url = this.url + "/anta/api/get-documents/corpus/test/?indent";
console.log("query", url);

$.ajax({
type: 'GET',
url: url,
success: successCallback,
dataType: 'json'
});


};

0 comments on commit ae0f4d5

Please sign in to comment.