Пример #1
0
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))
Пример #2
0
 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))