From 0f1c839daa92be4e2f691a9831ea193e2a4061ea Mon Sep 17 00:00:00 2001 From: Corban-Lee <77944149+XordK@users.noreply.github.com> Date: Fri, 5 May 2023 00:24:10 +0100 Subject: [PATCH] Added live search to teams demo page Live search using ajax --- src/mainapp/teams_demo_test.py | 11 +++++ src/mainapp/templates/teams.html | 75 +++++++++++++++++++++++--------- src/mainapp/urls.py | 3 +- src/mainapp/views.py | 34 +++++++++------ 4 files changed, 88 insertions(+), 35 deletions(-) create mode 100644 src/mainapp/teams_demo_test.py diff --git a/src/mainapp/teams_demo_test.py b/src/mainapp/teams_demo_test.py new file mode 100644 index 0000000..0f95ba5 --- /dev/null +++ b/src/mainapp/teams_demo_test.py @@ -0,0 +1,11 @@ +import names +from string import ascii_lowercase + +created_teams = [] +for char in ascii_lowercase: + created_teams.append({ + "identifier": char.upper(), + "members": [{ + "name": names.get_full_name() + } for i in range(9)] + }) diff --git a/src/mainapp/templates/teams.html b/src/mainapp/templates/teams.html index 2bcfb1b..97ce908 100644 --- a/src/mainapp/templates/teams.html +++ b/src/mainapp/templates/teams.html @@ -16,32 +16,13 @@