コード例 #1
0
ファイル: handlersforums.py プロジェクト: juliettef/enkiWS
	def get( self, forum ):
		data = ''
		not_found = ''
		if forum.isdigit() and EnkiModelForum.get_by_id( int( forum ) ):
			EnkiModelCounter.increment()
			data = enki.libforum.get_forum_data( forum )
		else:
			not_found = MSG.FORUM_NOT_EXIST( )
		self.render_tmpl( 'forum.html', False,
		                  active_menu = 'forums',
		                  data = data,
		                  not_found = not_found,
		                  maxpostlength = enki.libforum.POST_LENGTH_MAX,
		                  maxthreadtitlelength = enki.libforum.THREAD_TITLE_LENGTH_MAX )
コード例 #2
0
 def get(self, forum):
     data = ''
     not_found = ''
     if forum.isdigit() and EnkiModelForum.get_by_id(int(forum)):
         EnkiModelCounter.increment()
         data = enki.libforum.get_forum_data(forum)
     else:
         not_found = MSG.FORUM_NOT_EXIST()
     self.render_tmpl(
         'forum.html',
         False,
         active_menu='forums',
         data=data,
         not_found=not_found,
         maxpostlength=enki.libforum.POST_LENGTH_MAX,
         maxthreadtitlelength=enki.libforum.THREAD_TITLE_LENGTH_MAX)
コード例 #3
0
ファイル: handlersforums.py プロジェクト: charlf/enkiWS
	def get( self ):
		thread_view_count = EnkiModelCounter.get_count()
		if not enki.libforum.exist_EnkiForums():
			# if no forum topic exists , populate the forums with default topics
			enki.libforum.set_forum()
		self.render_tmpl( 'forums.html',
		                  active_page = 'forums',
		                  thread_view_count = thread_view_count,
		                  data_company = enki.libforum.get_forums_data( 'Company' ),
		                  data_game = enki.libforum.get_forums_data( 'Game' ) )
コード例 #4
0
 def get(self):
     thread_view_count = EnkiModelCounter.get_count()
     if not enki.libforum.exist_EnkiForums():
         # if no forum topic exists , populate the forums with default topics
         enki.libforum.set_forum()
     self.render_tmpl('forums.html',
                      False,
                      active_menu='forums',
                      thread_view_count=thread_view_count,
                      data_company=enki.libforum.get_forums_data('Company'),
                      data_game=enki.libforum.get_forums_data('Game'))