add debugging in case of wrong event id
This commit is contained in:
7
app.py
7
app.py
@@ -44,6 +44,13 @@ def index():
|
||||
@auth.login_required
|
||||
def show_event(id):
|
||||
event = calendar_interface.get_calendar_event(id)
|
||||
|
||||
if "error" in event:
|
||||
print("id:", id)
|
||||
logging.error("Found error in event query with id\n%s", event)
|
||||
logging.error(json.dumps(event, indent=2))
|
||||
abort(404)
|
||||
|
||||
calendar_interface.convert_datetime(event)
|
||||
|
||||
attendees= ", ".join(
|
||||
|
||||
@@ -212,6 +212,7 @@ if __name__ == "__main__":
|
||||
#print(json.dumps(events, indent=2))
|
||||
|
||||
convert_datetimes(events)
|
||||
convert_datetime(events[0])
|
||||
|
||||
print(json.dumps([(e["subject"], e["start"], e["duration"], e["attendees"], e["id"]) for e in events], indent=2))
|
||||
|
||||
@@ -244,9 +245,7 @@ if __name__ == "__main__":
|
||||
print(json.dumps(ret, indent=2))
|
||||
|
||||
if args.send_test_email:
|
||||
with open("templates/auth/activate.html") as f:
|
||||
content=f.read()
|
||||
|
||||
print(send_mail("struebin.patrick@gmail.com", "test test", content))
|
||||
print(send_mail("struebin.patrick@gmail.com", "test test", "bla"))
|
||||
|
||||
print("Done.")
|
||||
@@ -11,7 +11,7 @@ class Config(DefaultConfig):
|
||||
class ProductionConfig(Config):
|
||||
SECRET_KEY = '\xacI4\x077\x16?Q\xb4")\xdb\x066\x95\x11i\x0b\x0c&\xb6rP\''
|
||||
SECURITY_PASSWORD_SALT = '>\xe3\x9bz\xfd\xbc[\xe22\xcfK\xca\x88!\xd8\xd5,\xd0\x95\x0c\x02\xad\xfa\x9d'
|
||||
DATABASE_URI = 'mysql://user@localhost/foo'
|
||||
DATABASE_URI = '/home/site/wwwroot/users.db' # For azure app services. The content under wwwroot is durable, unless you delete your app service.
|
||||
|
||||
class DevelopmentConfig(Config):
|
||||
DEBUG = True
|
||||
|
||||
Reference in New Issue
Block a user