python: add version index.html

This commit is contained in:
Taygunova Rina
2023-12-01 10:52:14 +03:00
parent 11075304a5
commit 457e38c35a
3 changed files with 6 additions and 1 deletions

View File

@ -24,6 +24,9 @@ from src.common import string
class ConfigurationManager:
version = '1.7.0'
def getVersion(self) -> str:
return self.version
def example_url(self) -> Optional[ParseResult]:
url = environ.get('EXAMPLE_URL')
if not url:

View File

@ -45,7 +45,8 @@ def default(request): # default parameters that will be passed to the template
'convExt': json.dumps(format_manager.convertible_extensions()), # file extensions that can be converted
'files': docManager.getStoredFiles(request), # information about stored files
'fillExt': json.dumps(format_manager.fillable_extensions()),
'directUrl': str(getDirectUrlParam(request)).lower
'directUrl': str(getDirectUrlParam(request)).lower,
'serverVersion': config_manager.getVersion()
}
# execute the "index.html" template with context data and return http response in json format
return render(request, 'index.html', context)

View File

@ -25,6 +25,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width" />
<meta name="server-version" content="{{serverVersion}}">
<title>ONLYOFFICE Document Editors</title>
<link href="{% static "images/favicon.ico" %}" rel="shortcut icon" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:900,800,700,600,500,400,300&subset=latin,cyrillic-ext,cyrillic,latin-ext" />