diff --git a/univcloud/apps/weather.py b/univcloud/apps/weather.py index 31bafdc..680ee4c 100644 --- a/univcloud/apps/weather.py +++ b/univcloud/apps/weather.py @@ -24,3 +24,13 @@ class App(BaseApp): '''Weather App, used to display the current weather''' app_id = 'weather-app' template_name = 'apps/weather.html' + location = None + + def __init__(self, app_id, location='615702', **kwargs): + super(App, self).__init__(app_id, **kwargs) + self.location = location + + def get_content_args(self): + args = super(App, self).get_content_args() + args.update({'location': self.location}) + return args diff --git a/univcloud/templates/apps/add.html b/univcloud/templates/apps/add.html index f3c0a4a..66bb3a9 100644 --- a/univcloud/templates/apps/add.html +++ b/univcloud/templates/apps/add.html @@ -28,13 +28,25 @@ Nouvelle applicationĀ :
- +