summaryrefslogtreecommitdiff
path: root/tools/mmd/MmdCommands.py
diff options
context:
space:
mode:
authorJogi Hofmüller <jogi@mur.at>2011-08-03 11:19:44 +0000
committerJogi Hofmüller <jogi@mur.at>2011-08-03 11:19:44 +0000
commit502b6a813a6f90c2e7adb5781b1beecd559014d9 (patch)
tree6c46b328e6a106bc770ad77650c0b6a14fb525e5 /tools/mmd/MmdCommands.py
parentcleanup (diff)
- added functionality for location
- user's default location is save - map centers on user's location iff available git-svn-id: https://svn.spreadspace.org/mur.sat@96 7de4ea59-55d0-425e-a1af-a3118ea81d4c
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 = ''