web2py新控制器无效功能

时间:2012-05-17 15:32:39

标签: python web2py

我的Web2py应用程序中有以下控制器

  1. ABOOK
  2. 帐户
  3. AJAX
  4. 默认
  5. factures
  6. 信件
  7. 付款
  8. 除了abook之外一切都很完美,这是最后一个创建控制器所以它是最新的,我注意到现在每个新的控制器都被创建了

    # abook.py:
    
    # -*- coding: utf-8 -*-
    ### required - do no delete
    response.generic_patterns=['*']
    import functions as fu
    import os, uuid, string, datetime
    if auth.user_id:
        session.language = fu.default_language(db,auth)
    else:
        session.language = session.preferredLanguage
    def user(): return dict(form=auth())
    @auth.requires_login()
    def setlanguage(language):
        if session.language == None:
            session.language = session.preferredLanguage
            T.force(session.languageIdentifiers[session.language])
            pass
        else:
            session.language = language
            T.force(session.languageIdentifiers[language])
            pass
        pass
    ### end requires
    
    def index():
        return dict()
    
    ...
    ...
    ...
    

    并为每个函数创建了一个视图HTML-template

    但我总是

    invalid function (abook/FUNCTION_NAME)
    

    Web2py版本:1.99.7

0 个答案:

没有答案