예제 #1
0
    def initialize(self):

        self.mdb = MPage()
        self.mcat = MCatalog()
        self.cats = self.mcat.query_all()
        self.mspec = SpesubModel()
        self.specs = self.mspec.get_all()
예제 #2
0
파일: menu.py 프로젝트: ifcheung2012/TorCMS
 def render(self):
     self.mcat = SpesubModel()
     all_cats = self.mcat.get_all()
     kwd = {
         'cats': all_cats,
     }
     return self.render_string('tplite/modules/spec_menu.html', kwd=kwd)
예제 #3
0
    def initialize(self):

        self.mpost = MPost()
        self.mcat = MCatalog()
        self.cats = self.mcat.query_all()
        self.mspec = SpesubModel()
        self.specs = self.mspec.get_all()
        self.mpost2catalog = MPost2Catalog()
예제 #4
0
 def render(self):
     self.mcat = SpesubModel()
     all_cats = self.mcat.get_all()
     kwd = {
         'cats': all_cats,
     }
     return self.render_string('{0}/modules/spec_menu.html'.format(
         config.torlite_template_name),
                               kwd=kwd)
예제 #5
0
 def initialize(self):
     self.muser = MUser()
     self.mpage = MPage()
     self.mdb = MPost()
     self.mcat = MCatalog()
     self.cats = self.mcat.query_all()
     self.mspec = SpesubModel()
     if self.get_current_user():
         self.userinfo = self.muser.get_by_id(self.get_current_user())
     else:
         self.userinfo = None
예제 #6
0
 def initialize(self):
     self.muser = MUser()
     self.mwiki = MWiki()
     self.mcat = MCatalog()
     self.cats = self.mcat.query_all()
     self.mspec = SpesubModel()
     self.specs = self.mspec.get_all()
     self.mwiki_hist = MWikiHist()
     if self.get_current_user():
         self.userinfo = self.muser.get_by_id(self.get_current_user())
     else:
         self.userinfo = None
예제 #7
0
    def initialize(self):
        self.muser = MUser()
        self.mpost = MPost()
        self.mcat = MCatalog()
        self.cats = self.mcat.query_all()
        self.mspec = SpesubModel()
        self.specs = self.mspec.get_all()
        self.mpost_hist = MPostHist()
        self.mpost2catalog = MPost2Catalog()
        self.mreply = MReply()

        if self.get_current_user():
            self.userinfo = self.muser.get_by_id(self.get_current_user())
        else:
            self.userinfo = None
예제 #8
0
    def initialize(self):
        self.init()
        self.muser = MUser()
        self.mpost = MPost()
        self.mcat = MCatalog()
        self.cats = self.mcat.query_all()
        self.mspec = SpesubModel()
        self.specs = self.mspec.get_all()
        self.mpost_hist = MPostHist()
        self.mpost2catalog = MPost2Catalog()
        self.mpost2reply = MPost2Reply()
        self.mapp2tag = MPost2Label()
        self.mrel = MRelation()
        self.tmpl_router = 'post_ajax'

        if self.get_current_user():
            self.userinfo = self.muser.get_by_id(self.get_current_user())
        else:
            self.userinfo = None
예제 #9
0
    def initialize(self):
        # analyzer = ChineseAnalyzer()
        # schema = Schema(title=TEXT(stored=True, analyzer = analyzer), path=ID(stored=True), content=TEXT(stored=True, analyzer=analyzer))
        # ix = config.ix
        # self.searcher = config.searcher
        # self.parser = config.parser
        # self.parser = QueryParser("content", schema=ix.schema)

        self.muser = MUser()
        self.mpost = MPost()
        self.mcat = MCatalog()
        self.cats = self.mcat.query_all()
        self.mspec = SpesubModel()
        self.specs = self.mspec.get_all()
        self.mpost_hist = MPostHist()
        self.mpost2catalog = MPost2Catalog()
        if self.get_current_user():
            self.userinfo = self.muser.get_by_id(self.get_current_user())
        else:
            self.userinfo = None