source: buildhelpers/codegen/templates/__main__.mustache@ 43fd35c

debian/bullseye
Last change on this file since 43fd35c was 43fd35c, checked in by Joachim Langenbach <joachim.langenbach@…>, 7 years ago

Refactored code to have one gnuboat python structure

  • Property mode set to 100644
File size: 509 bytes
RevLine 
[3a89adb]1{{#supportPython2}}
2#!/usr/bin/env python
3{{/supportPython2}}
4{{^supportPython2}}
5#!/usr/bin/env python3
6{{/supportPython2}}
7
[5c9c247]8import os
9
[43fd35c]10from {{packageName}}_impl import (
11 app, application, mail, celery, setup_app, config_object
12)
[3a89adb]13
14def main():
[5c9c247]15 setup_app('{{appName}}', config_object, template_folder = os.path.join(os.path.dirname(__file__), 'templates'))
[a88607b]16 app.run(host=application.config.get("HOST", "localhost"), port=application.config.get("PORT", {{serverPort}}))
[3a89adb]17
18if __name__ == '__main__':
19 main()
Note: See TracBrowser for help on using the repository browser.