Exemplo n.º 1
0
 def _set_collection(self):
     mf_logger.debug("Available collections : {0}".format(self._db.collection_names()))
     mf_logger.debug("Want : {0}".format(self._collection_name))
     if self._collection_name in self._db.collection_names():
         self._collection = [self._db[self._collection_name] ]
     else:
         self._collection = list()
         for name in self._db.collection_names():
             if name in ['system.indexes','system.users']: continue
             self._collection.append(self._db[name])
Exemplo n.º 2
0
 def _set_collection(self):
     mf_logger.debug("Available collections : {0}".format(
         self._db.collection_names()))
     mf_logger.debug("Want : {0}".format(self._collection_name))
     if self._collection_name in self._db.collection_names():
         self._collection = [self._db[self._collection_name]]
     else:
         self._collection = list()
         for name in self._db.collection_names():
             if name in ['system.indexes', 'system.users']: continue
             self._collection.append(self._db[name])
Exemplo n.º 3
0
from base import app
from flask import render_template,url_for
from modular_forms import mf,MF,mf_logger

@mf.context_processor
def body_class():
  return { 'body_class' : MF }

mf_logger.debug("EN_V path: {0}".format(app.jinja_loader.searchpath ))
@mf.route("/")
def modular_form_main_page():
    info=dict()
    title = "Modular Forms"
    return render_template("mf_navigation.html",info=info,title=title,bread=[])