import couchdb import json import difflib from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from nodetraq.lib.base import BaseController, render, user_level from nodetraq.lib.cotendohelper import NodetraqCotendo from couchdbhelper import CouchHelper log = logging.getLogger(__name__) ch = CouchHelper("http://localhost:5984") ch.select("nodetraq") class DnsController(BaseController): @user_level(0) def __before__(self): super(DnsController, self).__before__() #def index(self): # return render('/dns/select_domain.mako') # pass def index(self, domain='yourdomainhere'): c.title = "Nodetraq -- DNS" c.selected_page = "dns" c.subpage = "list"
#!/bin/env python2.6 from couchdbhelper import CouchHelper ch = CouchHelper("http://mydomain.com:5984") try: ch.couch.create('apache_errors') except: pass ch.select('apache_errors') ch.sync_view('./views')
import couchdb import json import difflib from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from nodetraq.lib.base import BaseController, render, user_level from nodetraq.lib.cotendohelper import NodetraqCotendo from couchdbhelper import CouchHelper log = logging.getLogger(__name__) ch = CouchHelper("http://localhost:5984") ch.select("nodetraq") class DnsController(BaseController): @user_level(0) def __before__(self): super(DnsController, self).__before__() #def index(self): # return render('/dns/select_domain.mako') # pass def index(self, domain='yourdomainhere'): c.title = "Nodetraq -- DNS" c.selected_page = "dns" c.subpage = "list" c.domain = domain