summaryrefslogtreecommitdiff
path: root/tools/mmd/MmdCommands.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mmd/MmdCommands.py')
-rw-r--r--tools/mmd/MmdCommands.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/mmd/MmdCommands.py b/tools/mmd/MmdCommands.py
index 5355783..c1dbeb9 100644
--- a/tools/mmd/MmdCommands.py
+++ b/tools/mmd/MmdCommands.py
@@ -46,6 +46,7 @@ def register (session):
callsign = session.getQsCallsign ()
longitude = session.getQsLongitude ()
latitude = session.getQsLatitude ()
+ location_name = session.getQsLocationName ()
password = session.getQsPassword ()
confirm = session.getQsConfirm ()
@@ -54,7 +55,11 @@ def register (session):
return indexWidget (dataWidget (), errorWidget (error_message), statusWidget (session), session)
user = User ()
- code = user.create (session.session_id, firstname, lastname, email, callsign, longitude, latitude, password)
+ code = user.create (session.session_id, firstname, lastname, email, callsign, password)
+
+ if longitude != '' and latitude != '' and location_name != '':
+ user.addLocation (location_name, longitude, latitude, 'yes')
+
message = '''From: noreply <noreply@mur.at>
To: "{0} {1}" <{2}>
Subject: MMD registration confirmation request
@@ -124,7 +129,8 @@ def index (session):
"""
display the index page
"""
- return indexWidget (dataWidget (), osmWidget (), statusWidget (session), session)
+ satellite = {'longitude': 15.4426, 'latitude': 47.06576}
+ return indexWidget (dataWidget (), osmWidget (satellite, session.user), statusWidget (session), session)
def mmdtest (env, cookie):
body = ''