Make the application name and version details configurable.
							parent
							
								
									3e6436bc9b
								
							
						
					
					
						commit
						417ad2c6ee
					
				| 
						 | 
				
			
			@ -11,6 +11,26 @@
 | 
			
		|||
 | 
			
		||||
from logging import *
 | 
			
		||||
 | 
			
		||||
##########################################################################
 | 
			
		||||
# Application settings
 | 
			
		||||
##########################################################################
 | 
			
		||||
 | 
			
		||||
# Name of the application to display in the UI
 | 
			
		||||
APP_NAME = 'pgAdmin 4'
 | 
			
		||||
 | 
			
		||||
# Application version number components
 | 
			
		||||
APP_MAJOR = 1
 | 
			
		||||
APP_MINOR = 0
 | 
			
		||||
APP_REVISION = 0
 | 
			
		||||
 | 
			
		||||
# Application version suffix, e.g. 'beta1', 'dev'. Usually an empty string
 | 
			
		||||
# for GA releases.
 | 
			
		||||
APP_SUFFIX = 'dev'
 | 
			
		||||
 | 
			
		||||
# DO NOT CHANGE!
 | 
			
		||||
# The application version string, constructed from the components
 | 
			
		||||
APP_VERSION = '%s.%s.%s-%s' % (APP_MAJOR, APP_MINOR, APP_REVISION, APP_SUFFIX)
 | 
			
		||||
 | 
			
		||||
##########################################################################
 | 
			
		||||
# Log settings
 | 
			
		||||
##########################################################################
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,7 +52,7 @@ app.logger.addHandler(ch)
 | 
			
		|||
logger.addHandler(ch)
 | 
			
		||||
 | 
			
		||||
app.logger.info('################################################################################')
 | 
			
		||||
app.logger.info('Starting pgAdmin 4...')
 | 
			
		||||
app.logger.info('Starting %s v%s...', config.APP_NAME, config.APP_VERSION)
 | 
			
		||||
app.logger.info('################################################################################')
 | 
			
		||||
 | 
			
		||||
# The main index page
 | 
			
		||||
| 
						 | 
				
			
			@ -64,7 +64,7 @@ Today is <b>%s</b>
 | 
			
		|||
<br />
 | 
			
		||||
<i>This is Flask-generated HTML.</i>
 | 
			
		||||
<br /><br />
 | 
			
		||||
<a href="http://www.pgadmin.org/">pgAdmin 4</a>""" % ctime(time())
 | 
			
		||||
<a href="http://www.pgadmin.org/">%s v%s</a>""" % (ctime(time()), config.APP_NAME, config.APP_VERSION)
 | 
			
		||||
 | 
			
		||||
    return output
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue