Skip to content
Snippets Groups Projects
Commit 7d884a0e authored by hwilks's avatar hwilks
Browse files

account events page works

parent 46c12822
Branches feature/AccountEventPage
No related tags found
3 merge requests!74v.1.0,!64Issue/password val,!48Feature/add events to account
Pipeline #101720 failed
......@@ -5,9 +5,9 @@ CREATE TABLE IF NOT EXISTS users (
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS account_events {
CREATE TABLE IF NOT EXISTS account_events (
user_id INT NOT NULL,
event_id INT,
PRIMARY KEY (user_id, event_id),
FOREIGN KEY (user_id) REFERENCES users(user_id)
};
\ No newline at end of file
);
\ No newline at end of file
......@@ -152,11 +152,12 @@ def get_events(account_id):
event['name'] = data_output['name']
event['url'] = url_for('eventSummary', event_id=event_id)
events.append(event)
'''
#Test data
event1= {'name':'An event','url':url_for('eventSummary', event_id=1)}
event2= {'name':'An event 2','url':'a url'}
events = [event1, event2]
'''
return render_template('accountEvents.html', event=events)
return render_template('accountEvents.html')
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment