def admin_add(request, module_type): request.module = Module.from_type(module_type) return render_to_response("admin/add.html", {"admin_mode": "ADD"}, context_instance=RequestContext(request))
def __init__(self): from mittens.modules.models import Module # create a module definition for each installed module self.modules = [] for path in settings.INSTALLED_MODULES: self.modules.append(Module.from_path(path))