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])
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])
from lmfdb.base import app from flask import render_template, url_for from lmfdb.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=[])
from lmfdb.app import app from flask import redirect, url_for from lmfdb.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(): return redirect(url_for('modular_forms'),301)