diff --git a/manage.py b/manage.py index ec641ab42c638252434169d32d31432bd97bbfac..40faf9e22aa6a1d62886f66be6dbe407e4dc0130 100755 --- a/manage.py +++ b/manage.py @@ -2,19 +2,25 @@ # -*- encoding: utf-8 -*- import os import sys - # À partir de Django 1.7, on doit faire le setup si on veut pouvoir # importer les modules avant d'avoir chargé toutes les apps # Et on a besoin de connaître le nom du module settings pour cela -import django - - -os.environ["DJANGO_SETTINGS_MODULE"] = "note.settings" -django.setup() if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "note.settings") - - from django.core.management import execute_from_command_line - + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise execute_from_command_line(sys.argv) diff --git a/note/settings.py b/note/settings.py index 96d764fe80a2243e11787508fb49be773ec4ae6d..daa9a1e40a0404e1c752331afc2644a06fcabb54 100644 --- a/note/settings.py +++ b/note/settings.py @@ -24,8 +24,6 @@ else: DEFAULT_CHARSET = "utf-8" #: Mode de debug DEBUG = not PROD -#: Debug aussi quand on plante dans le rendering d'un template -TEMPLATE_DEBUG = DEBUG #: Adresse mail à qui envoyer des problèmes durant l'exécution @@ -129,11 +127,11 @@ MEDIA_URL = os.path.join(NOTE_ROOT_URL, 'media/') #: URL prefix for static files. #: Example: "http://media.lawrence.com/static/" -STATIC_URL = '/static/' +STATIC_URL = r'/static/' #: Additional locations of static files STATICFILES_DIRS = ( - ROOT_PATH + "static/", + os.path.join(PROJECT_PATH, '../static/'), # Put strings here, like "/home/html/static" or "C:/www/django/static". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. @@ -150,24 +148,20 @@ STATICFILES_FINDERS = ( from secrets import SECRET_KEY #: List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', -# 'django.template.loaders.eggs.Loader', -) -#: A tuple of callables that are used to populate the context in RequestContext. -#: These callables take a request object as their argument -#: and return a dictionary of items to be merged into the context. -TEMPLATE_CONTEXT_PROCESSORS = ( - "django.contrib.auth.context_processors.auth", - "django.core.context_processors.debug", - "django.core.context_processors.i18n", - "django.core.context_processors.media", - "django.core.context_processors.static", - "django.core.context_processors.request", - "django.contrib.messages.context_processors.messages" - ) +TEMPLATES = [{ + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': ['templates'], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }] #: A tuple of middleware classes to use. See `Middleware `_. MIDDLEWARE_CLASSES = ( @@ -190,15 +184,9 @@ MIDDLEWARE_CLASSES = ( ROOT_URLCONF = 'urls' #: Python dotted path to the WSGI application used by Django's runserver. -WSGI_APPLICATION = '..wsgi.application' +WSGI_APPLICATION = 'note.wsgi.application' + -#: List of locations of the template source files searched by django.template.loaders.filesystem.Loader, in search order. -TEMPLATE_DIRS = ( - ROOT_PATH + "note/templates/", - # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". - # Always use forward slashes, even on Windows. - # Don't forget to use absolute paths, not relative paths. -) #: A tuple of strings designating all applications that are enabled in this Django installation. #: Each string should be a full Python path to a Python package that contains a Django application, diff --git a/note/templates/handler_base.html b/note/templates/handler_base.html index 454c145fb13557ae9f91499cb1c6e6b490fa468b..8458eb00c6ca96bcaad1288a3fb4cdae7c441444 100644 --- a/note/templates/handler_base.html +++ b/note/templates/handler_base.html @@ -1,5 +1,6 @@ {% load note_templatetags %} {% load i18n %} +{% load static %} {% get_current_language as LANGUAGE_CODE %} @@ -10,8 +11,8 @@ {% block stylesheets %} - - + + - - + + - - + + - + + {% endblock %} {% block applets %} diff --git a/note/templates/note/compte.html b/note/templates/note/compte.html index 2d16de76cf1ab9e0736d99d7320279c3b80cc93d..82cefa60b62743fed862c39c7111a40dc98c7c4f 100644 --- a/note/templates/note/compte.html +++ b/note/templates/note/compte.html @@ -1,5 +1,6 @@ {% extends "note/base.html" %} {% load i18n %} +{% load static %} {# Pour ne pas utiliser la taille par défaut de la page #} diff --git a/note/templates/note/comptes.html b/note/templates/note/comptes.html index dc6eafc0dc9e494a8ee4b8d6fa6c2a1a09bd3be6..d3698e002340eb44d887ae1a315f4284de63cab7 100644 --- a/note/templates/note/comptes.html +++ b/note/templates/note/comptes.html @@ -1,10 +1,10 @@ {% extends "note/base.html" %} {% load i18n %} - +{% load static %} {% block title %}{% trans "Comptes" %}{% endblock %} {% block additional_javascript %} - - + + {% endblock %} {% block applets %} diff --git a/note/templates/note/consos.html b/note/templates/note/consos.html index 0048aa824cb5434327f5f33e76c26098c42c2aec..5572594d5481177fbaca8b015f5e85293732a857 100644 --- a/note/templates/note/consos.html +++ b/note/templates/note/consos.html @@ -1,17 +1,18 @@ {% extends "note/base.html" %} {% load note_templatetags %} {% load i18n %} +{% load static %} {% block title %}{% trans "Consos" %}{% endblock %} {% block additional_javascript %} - - + + - - - - - + + + + + {% endblock %} {% block applets %} diff --git a/note/templates/note/dons.html b/note/templates/note/dons.html index e0ca12373a8414a0de7c9684a0602346a10fbb48..becdeba441fad36d8c8d07c08889279c019856cb 100644 --- a/note/templates/note/dons.html +++ b/note/templates/note/dons.html @@ -1,14 +1,15 @@ {% extends "note/base.html" %} {% load note_templatetags %} {% load i18n %} +{% load static %} {% block title %}{% trans "Virements" %}{% endblock %} {% block additional_javascript %} - - - - + + + + - + + - + + {% endblock %} {% block applets %} diff --git a/note/templates/note/un_compte_historique.html b/note/templates/note/un_compte_historique.html index 37bcbdc2be6deec77218f0bf019c32f93231fd50..b6d9cc8d876a1d444ead3f83615a762cdec4c7cf 100644 --- a/note/templates/note/un_compte_historique.html +++ b/note/templates/note/un_compte_historique.html @@ -1,5 +1,6 @@ {% extends "note/compte.html" %} {% load i18n %} +{% load static %} {% block title %}{% blocktrans with idbde=compte.idbde %}Historique des transactions du compte n°{{ idbde }}{% endblocktrans %}{% endblock %} @@ -8,6 +9,6 @@ {% endblock %} {% block additional_javascript %} - - + + {% endblock %} diff --git a/note/urls.py b/note/urls.py index c1d331420746e047c8b32e996a4ba9ad23f0db8f..b9f7c0f7ea1187197d3f2063ff08ac688918b240 100644 --- a/note/urls.py +++ b/note/urls.py @@ -5,93 +5,94 @@ est chargée de générer la page correspondante. """ -from django.conf.urls import patterns, include, url +from django.conf.urls import include, url # Import pour la traduction du javascript from django.views.i18n import javascript_catalog - +import note.views +import note.ajaj #: Liste des patterns d'url -urlpatterns = patterns('note.views', +urlpatterns = [ # pages de base - url(ur'^/*$', 'login_page'), - url(ur'^/index/*$', 'index'), - url(ur'^/logout/*$', 'logout'), + url(ur'^/*$', note.views.login_page ,name='login_page'), + url(ur'^/index/*$', note.views.index,name='index'), + url(ur'^/logout/*$', note.views.logout,name='logout'), # Page pour changer la langue url(ur'^i18n/', include('django.conf.urls.i18n')), # consos - url(ur'^/consos(?P-double)?/*$', 'consos'), + url(ur'^/consos(?P-double)?/*$', note.views.consos,name='consos'), # dons - url(ur'^/(?:virements|dons)/*', 'dons'), + url(ur'^/(?:virements|dons)/*', note.views.dons,name='dons'), # les activités et invitations - url(ur'^/(?:activite|invitation)s?(?P/admin)?(?P/old)?/*$', 'activites'), - url(ur'^/(?:activite|invitation)s?/(?P[^/]*)/gestion(?P/validate|/invalidate|/delete)?/*$', 'activite_gestion'), - url(ur'^/(?:activite|invitation)s?/(?P[^/]*)/gestion/modifier/*$', 'activite_gestion_modifier'), - url(ur'^/(?:activite|invitation)s?/(?P[^/]*)(?P/admin)?/*$', 'activite'), - url(ur'^/(?:activite|invitation)s?/(?P[^/]*)/del_invite/(?P[^/]*)(?P/admin)?/*$', 'del_invite'), + url(ur'^/(?:activite|invitation)s?(?P/admin)?(?P/old)?/*$', note.views.activites,name='activites'), + url(ur'^/(?:activite|invitation)s?/(?P[^/]*)/gestion(?P/validate|/invalidate|/delete)?/*$', note.views.activite_gestion,name='activite_gestion'), + url(ur'^/(?:activite|invitation)s?/(?P[^/]*)/gestion/modifier/*$', note.views.activite_gestion_modifier,name='activite_gestion_modifier'), + url(ur'^/(?:activite|invitation)s?/(?P[^/]*)(?P/admin)?/*$', note.views.activite,name='activite'), + url(ur'^/(?:activite|invitation)s?/(?P[^/]*)/del_invite/(?P[^/]*)(?P/admin)?/*$', note.views.del_invite,name='del_invite'), # mes_activités = création d'activités - url(ur'^/mes_activites(?:/(?P[^/]*))?(?P/delete)?/*$', 'mes_activites'), + url(ur'^/mes_activites(?:/(?P[^/]*))?(?P/delete)?/*$', note.views.mes_activites,name='mes_activites'), # la recherche et gestion des comptes - url(ur'^/comptes_advanced/*$', 'comptes_advanced'), - url(ur'^/search_historique_pseudo/*$', 'search_historique_pseudo'), - url(ur'^/comptes/(?P[^/]*)/*$', 'comptes'), - url(ur'^/comptes/(?P[^/]*)/historique/(?P\d+)/*$', 'historique_transactions'), - url(ur'^/comptes/(?P[^/]*)/historique/*$', 'historique_transactions'), - url(ur'^/comptes/(?P[^/]*)/modifier(/listedroits)?/*$', 'modifier_compte'), - url(ur'^/comptes/(?P[^/]*)/supprimer/*$', 'supprimer_compte'), - url(ur'^/comptes/(?P[^/]*)/modifier/password/*$', 'password'), - url(ur'^/comptes/(?P[^/]*)/modifier/photo/*$', 'update_photo'), - url(ur'^/comptes/(?P[^/]*)/aliases/*$', 'aliases'), - url(ur'^/comptes/(?P[^/]*)/aliases/delete(?P_all)?/(?P[^/]*)/*$', 'unalias'), - url(ur'^/comptes/(?P[^/]*)/historique_pseudo/*$', 'historique_pseudo'), + url(ur'^/comptes_advanced/*$', note.views.comptes_advanced,name='comptes_advanced'), + url(ur'^/search_historique_pseudo/*$', note.views.search_historique_pseudo,name='search_historique_pseudo'), + url(ur'^/comptes/(?P[^/]*)/*$', note.views.comptes,name='comptes'), + url(ur'^/comptes/(?P[^/]*)/historique/(?P\d+)/*$', note.views.historique_transactions,name='historique_transactions'), + url(ur'^/comptes/(?P[^/]*)/historique/*$', note.views.historique_transactions,name='historique_transactions'), + url(ur'^/comptes/(?P[^/]*)/modifier(/listedroits)?/*$', note.views.modifier_compte,name='modifier_compte'), + url(ur'^/comptes/(?P[^/]*)/supprimer/*$', note.views.supprimer_compte,name='supprimer_compte'), + url(ur'^/comptes/(?P[^/]*)/modifier/password/*$', note.views.password,name='password'), + url(ur'^/comptes/(?P[^/]*)/modifier/photo/*$', note.views.update_photo,name='update_photo'), + url(ur'^/comptes/(?P[^/]*)/aliases/*$', note.views.aliases,name='aliases'), + url(ur'^/comptes/(?P[^/]*)/aliases/delete(?P_all)?/(?P[^/]*)/*$', note.views.unalias,name='unalias'), + url(ur'^/comptes/(?P[^/]*)/historique_pseudo/*$', note.views.historique_pseudo,name='historique_pseudo'), #les réadhésions - url(ur'^/readhesions/(?P[^/]*)/*$', 'readhesions'), + url(ur'^/readhesions/(?P[^/]*)/*$', note.views.readhesions,name='readhesions'), # la gestion des boutons - url(ur'^/boutons/*$', 'boutons'), - url(ur'^/boutons/(?P[^/]*)(?P/delete)?/*$', 'boutons'), + url(ur'^/boutons/*$', note.views.boutons,name='boutons'), + url(ur'^/boutons/(?P[^/]*)(?P/delete)?/*$', note.views.boutons,name='boutons'), # les préinscription - url(ur'^/preinscriptions?/*$', 'preinscriptions'), + url(ur'^/preinscriptions?/*$', note.views.preinscriptions,name='preinscriptions'), # les inscriptions - url(ur'^/inscriptions?(?:/(?P[^/]*))?(?P/delete)?/*$', 'inscriptions'), + url(ur'^/inscriptions?(?:/(?P[^/]*))?(?P/delete)?/*$', note.views.inscriptions,name='inscriptions'), # Application WEI - url(ur'^/wei/*$', 'WEIaccueil'), - url(ur'^/wei/monInscription/*$', 'WEImonInscription'), - url(ur'^/wei/1a/*$', 'WEI1A'), - url(ur'^/wei/vieux/*$', 'WEIvieux'), - url(ur'^/wei/admin/*$', 'WEIAdmin'), - url(ur'^/wei/inscrits/*$', 'WEIinscrits'), - url(ur'^/wei/inscrits/readherer/(?P\d+)/*', 'WEIreadherer'), - url(ur'^/wei/inscrits/(?P\d+)/*$', 'WEIchangeInscription'), - url(ur'^/wei/inscrits1a/*$', 'WEIinscrits1A'), - url(ur'^/wei/inscrits1a/(?P\d+)/*$', 'WEIchangeInscription1A'), - url(ur'^/wei/inscrits1a/adherer/(?P\d+)/*$', 'WEIcreerCompte1A'), + url(ur'^/wei/*$', note.views.WEIaccueil,name='WEIaccueil'), + url(ur'^/wei/monInscription/*$', note.views.WEImonInscription,name='WEImonInscription'), + url(ur'^/wei/1a/*$', note.views.WEI1A,name='WEI1A'), + url(ur'^/wei/vieux/*$', note.views.WEIvieux,name='WEIvieux'), + url(ur'^/wei/admin/*$', note.views.WEIAdmin,name='WEIAdmin'), + url(ur'^/wei/inscrits/*$', note.views.WEIinscrits,name='WEIinscrits'), + url(ur'^/wei/inscrits/readherer/(?P\d+)/*', note.views.WEIreadherer,name='WEIreadherer'), + url(ur'^/wei/inscrits/(?P\d+)/*$', note.views.WEIchangeInscription,name='WEIchangeInscription'), + url(ur'^/wei/inscrits1a/*$', note.views.WEIinscrits1A,name='WEIinscrits1A'), + url(ur'^/wei/inscrits1a/(?P\d+)/*$', note.views.WEIchangeInscription1A,name='WEIchangeInscription1A'), + url(ur'^/wei/inscrits1a/adherer/(?P\d+)/*$', note.views.WEIcreerCompte1A,name='WEIcreerCompte1A'), # interface trésorerie - url(ur'^/tresorerie/*$','TresorerieAccueil'), - url(ur'^/tresorerie/cheques/*$','TresorerieCheques'), - url(ur'^/tresorerie/remises/*$','TresorerieRemises'), - url(ur'^/tresorerie/(?P[^/]*)/(?Pajout|delete)/*$','TresorerieAjoutRemise'), - url(ur'^/tresorerie/remises/(?P[^/]*)?(?P/clore)?/*$','TresorerieCloreRemise'), - url(ur'^/tresorerie/facturation/*$','TresorerieFacturation'), + url(ur'^/tresorerie/*$', note.views.TresorerieAccueil,name='TresorerieAccueil'), + url(ur'^/tresorerie/cheques/*$', note.views.TresorerieCheques,name='TresorerieCheques'), + url(ur'^/tresorerie/remises/*$', note.views.TresorerieRemises,name='TresorerieRemises'), + url(ur'^/tresorerie/(?P[^/]*)/(?Pajout|delete)/*$', note.views.TresorerieAjoutRemise,name='TresorerieAjoutRemise'), + url(ur'^/tresorerie/remises/(?P[^/]*)?(?P/clore)?/*$', note.views.TresorerieCloreRemise,name='TresorerieCloreRemise'), + url(ur'^/tresorerie/facturation/*$', note.views.TresorerieFacturation,name='TresorerieFacturation'), # regeneration du password - url(ur'^/regen_pw/(?P[^/]*)/*$', 'regen_pw'), + url(ur'^/regen_pw/(?P[^/]*)/*$', note.views.regen_pw,name='regen_pw'), # easter egg - url(ur'^/(?:teapot|the|tea|coffee|cafe)/*$', 'teapot'), + url(ur'^/(?:teapot|the|tea|coffee|cafe)/*$', note.views.teapot,name='teapot'), # Page de liste des droits - url(ur'^/listedroits/*$','liste_droits') -) + url(ur'^/listedroits/*$',note.views.liste_droits, name='liste_droits') +] -urlpatterns += patterns('note.ajaj', +urlpatterns += [ # les pages de requêtes AJAJ - url(ur'^/quick_search_(?Pbasic|dons)/*$', 'quick_search'), - url(ur'^/search/*$', 'search'), - url(ur'^/search_readhesion/*$', 'search_readhesion'), - url(ur'^/get_boutons/(?P[^/]*)/*$', 'get_boutons'), - url(ur'^/get_display_info/*$', 'get_display_info'), - url(ur'^/get_photo/(?P[^/]*)/*$', 'get_photo'), - url(ur'^/do_conso/*$', 'do_conso'), - url(ur'^/do_(?Pcredit|retrait)/*$', 'do_credit_retrait'), - url(ur'^/do_transfert/*$', 'do_transfert'), - url(ur'^/consos/toggle_transaction/*$', 'toggle_transaction'), -) + url(ur'^/quick_search_(?Pbasic|dons)/*$', note.ajaj.quick_search,name='quick_search'), + url(ur'^/search/*$', note.ajaj.search,name='search'), + url(ur'^/search_readhesion/*$', note.ajaj.search_readhesion,name='search_readhesion'), + url(ur'^/get_boutons/(?P[^/]*)/*$', note.ajaj.get_boutons,name='get_boutons'), + url(ur'^/get_display_info/*$', note.ajaj.get_display_info,name='get_display_info'), + url(ur'^/get_photo/(?P[^/]*)/*$', note.ajaj.get_photo,name='get_photo'), + url(ur'^/do_conso/*$', note.ajaj.do_conso,name='do_conso'), + url(ur'^/do_(?Pcredit|retrait)/*$', note.ajaj.do_credit_retrait,name='do_credit_retrait'), + url(ur'^/do_transfert/*$', note.ajaj.do_transfert,name='do_transfert'), + url(ur'^/consos/toggle_transaction/*$', note.ajaj.toggle_transaction,name='toggle_transaction'), +] @@ -100,6 +101,6 @@ js_info_dict = { } # Pour la traduction du javascript -urlpatterns += patterns('', - url(r'^jsi18n/$', javascript_catalog, js_info_dict, name='javascript_catalog'), -) +urlpatterns += [ + url(r'^jsi18n/$', javascript_catalog, js_info_dict,name='javascript_catalog'), +] diff --git a/note/wsgi.py b/note/wsgi.py new file mode 100644 index 0000000000000000000000000000000000000000..ef23776a36f478aa1342e75053b885f65c221712 --- /dev/null +++ b/note/wsgi.py @@ -0,0 +1,27 @@ +""" +WSGI config for plop project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "note.settings") + +application = get_wsgi_application() + + + + + + + + + + + diff --git a/urls.py b/urls.py index 3d5f26f139efc2c5e0d19d0eea0ccbd235707087..2291c67c75762ff5f2649a442b7d66a69a8d3d39 100644 --- a/urls.py +++ b/urls.py @@ -9,8 +9,8 @@ est en mode DEBUG. """ -from django.conf.urls import patterns, include, url - +from django.conf.urls import include, url +from django.conf.urls.static import static from note import settings if settings.DEBUG: @@ -26,18 +26,14 @@ handler500 = "note.views.server_error" from django.contrib import admin admin.autodiscover() - -urlpatterns = patterns('', +import note.urls +urlpatterns = [ url(r'^' + settings.NOTE_ROOT_URL.strip('/'), include('note.urls')), url(r'', include('note.urls')), url(r'^admin/', include(admin.site.urls)), -) +] if settings.DEBUG: # On n'utilise pas ça en prod urlpatterns += staticfiles_urlpatterns() - urlpatterns += patterns('', - (r'^%s/(?P.*)$' % (settings.MEDIA_URL.strip('/')), - 'django.views.static.serve', - {'document_root': settings.MEDIA_ROOT}), - ) + urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/wsgi.py b/wsgi.py index b50c4f1cb76dca81c90335a43f9d778986a37059..4a4a4e4e523a0fb99b93e1155638a007e2d548d9 100644 --- a/wsgi.py +++ b/wsgi.py @@ -1,43 +1,16 @@ -#!/usr/bin/env python -# -*- encoding: utf-8 -*- """ -WSGI config for Django_Client project. +WSGI config for plop project. -This module contains the WSGI application used by Django's development server -and any production WSGI deployments. It should expose a module-level variable -named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover -this application via the ``WSGI_APPLICATION`` setting. - -Usually you will have the standard Django WSGI application here, but it also -might make sense to replace the whole Django WSGI application with a custom one -that later delegates to the Django one. For example, you could introduce WSGI -middleware here, or combine a Django application with an application of another -framework. +It exposes the WSGI callable as a module-level variable named ``application``. +For more information on this file, see +https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ """ + import os -# ligne qui était là au départ, je l'ai virée parce que ça avait pas l'air -# d'importer ce qu'il fallait -#os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") +from django.core.wsgi import get_wsgi_application -# à la place, on va récupérer le path du dossier du fichier courant -here=os.path.dirname( os.path.realpath( __file__ ) ) -import sys -sys.path.append(here) -# et a priori settings.py est dans le même dossier os.environ.setdefault("DJANGO_SETTINGS_MODULE", "note.settings") -# Bon, il semblerait qu'on a aussi besoin du répertoire parent -uphere="/".join(here.split("/")[:-1]) -sys.path.append(uphere) - -# This application object is used by any WSGI server configured to use this -# file. This includes Django's development server, if the WSGI_APPLICATION -# setting points here. -from django.core.wsgi import get_wsgi_application application = get_wsgi_application() - -# Apply WSGI middleware here. -#from helloworld.wsgi import HelloWorldApplication -#application = HelloWorldApplication(application)