From 3cc68dc8045e2558c8ef7b33a60d0f1600fd0ba6 Mon Sep 17 00:00:00 2001 From: Liam Driscoll <driscolll4@cardiff.ac.uk> Date: Thu, 24 Nov 2022 18:03:21 +0000 Subject: [PATCH] Reshuffling work. --- static/add_coworking_spaces.py | 25 ------------------------- static/coworking_spaces.db | Bin 8192 -> 0 bytes static/coworking_spaces_functions.py | 9 +++++++++ static/test | 13 +++++++++++++ 4 files changed, 22 insertions(+), 25 deletions(-) delete mode 100644 static/add_coworking_spaces.py delete mode 100644 static/coworking_spaces.db create mode 100644 static/coworking_spaces_functions.py diff --git a/static/add_coworking_spaces.py b/static/add_coworking_spaces.py deleted file mode 100644 index 9fcc1b7..0000000 --- a/static/add_coworking_spaces.py +++ /dev/null @@ -1,25 +0,0 @@ -import flask -import csv - -name_Value = "NEWNEWNEW" -address_Value = "123CodeBase Edinburgh , 37a Castle Terrace, Edinburgh, EH1 2EL" -MP_Value = "123https://images.squarespace-cdn.com/content/v1/55439320e4b0f92b5d6c4c8b/1646867535415-4JI39H286BUMT26H4FHN/C36A1915.jpg?format=2500w" -AP_Value = "123https://images.squarespace-cdn.com/content/v1/55439320e4b0f92b5d6c4c8b/1646868533510-J1OT4PEG5VM9FCBF8BJE/15.10.19_-_CREATIVE_BRIDGE_C02_-_DAY01_-_LQ-19+%281%29.jpg?format=2500w,https://images.squarespace-cdn.com/content/v1/55439320e4b0f92b5d6c4c8b/1646868421127-07KQ4N1OHTDDKQME686A/15.10.19_-_CREATIVE_BRIDGE_C02_-_DAY01_-_LQ-52+%281%29.jpg?format=2500w" -description_Value = "123Hi. We\u2019re CodeBase. We've been exploring the world of startups and innovation for over five years now. We're not really sure how to best describe what we do, but we think the words \"tech cluster\" probably do it best. Please get in touch! We\u2019re friendly people who are geeky about building tech startups, managing disruption and innovation." -website_Value = "123https://www.thisiscodebase.com" -email_Value = "123info@thisiscodebase.com" -PN_Value = "123Hi(+44) 0131 560 2003" -OH_Value = "12308:00 - 17:00" -CI_Value = "123Use the email address or phone number to call ahead and book a desk, let them know you're a Tramshed member" - -recordValues = [name_Value, address_Value, MP_Value, AP_Value, description_Value, website_Value, email_Value, PN_Value, OH_Value, CI_Value] - -def addWorkingSpaces(values): - - with open('coworking_spaces.csv', 'a') as addToFile: - csvWriter = csv.writer(addToFile) - csvWriter.writerow(values) - addToFile.close() - return (f"{values} added.") - -addWorkingSpaces(recordValues) diff --git a/static/coworking_spaces.db b/static/coworking_spaces.db deleted file mode 100644 index 73b2146c58484292d12e86ed6c341bb8f9a265ac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8192 zcmeIuJqp5548ZZc;wtt6g^aqmcmS=^t&7?VRD8-q`@!Qay_bjaI9jmKt-JgKAt4DF ze&=KEg4J8&t1{?DVlhT`sv;7N(){|_w+_+IrXrH{_C4>fVv)sb>YP0S2q1s}0tg_0 z00IagfB*srj0Ex|F)oysr>&b{t2T5)jSi<QEix_AeV*ws)up?ttAo8;udR1g={tSc dZZ-NzivR)$Ab<b@2q1s}0tg_000Mt1@BwpnA*BES diff --git a/static/coworking_spaces_functions.py b/static/coworking_spaces_functions.py new file mode 100644 index 0000000..362635f --- /dev/null +++ b/static/coworking_spaces_functions.py @@ -0,0 +1,9 @@ +from csv import writer + +def addWorkingSpaces(values): + + with open('coworking_spaces.csv', 'a') as addToFile: + csvWriter = writer(addToFile) + csvWriter.writerow(values) + addToFile.close() + return (f"{values} added.") diff --git a/static/test b/static/test index 7286449..d9135c2 100644 --- a/static/test +++ b/static/test @@ -18,3 +18,16 @@ for x in range(len(keys)): """ """ + +name_Value = "NEWNEWNEW" +address_Value = "123CodeBase Edinburgh , 37a Castle Terrace, Edinburgh, EH1 2EL" +MP_Value = "123https://images.squarespace-cdn.com/content/v1/55439320e4b0f92b5d6c4c8b/1646867535415-4JI39H286BUMT26H4FHN/C36A1915.jpg?format=2500w" +AP_Value = "123https://images.squarespace-cdn.com/content/v1/55439320e4b0f92b5d6c4c8b/1646868533510-J1OT4PEG5VM9FCBF8BJE/15.10.19_-_CREATIVE_BRIDGE_C02_-_DAY01_-_LQ-19+%281%29.jpg?format=2500w,https://images.squarespace-cdn.com/content/v1/55439320e4b0f92b5d6c4c8b/1646868421127-07KQ4N1OHTDDKQME686A/15.10.19_-_CREATIVE_BRIDGE_C02_-_DAY01_-_LQ-52+%281%29.jpg?format=2500w" +description_Value = "123Hi. We\u2019re CodeBase. We've been exploring the world of startups and innovation for over five years now. We're not really sure how to best describe what we do, but we think the words \"tech cluster\" probably do it best. Please get in touch! We\u2019re friendly people who are geeky about building tech startups, managing disruption and innovation." +website_Value = "123https://www.thisiscodebase.com" +email_Value = "123info@thisiscodebase.com" +PN_Value = "123Hi(+44) 0131 560 2003" +OH_Value = "12308:00 - 17:00" +CI_Value = "123Use the email address or phone number to call ahead and book a desk, let them know you're a Tramshed member" + +recordValues = [name_Value, address_Value, MP_Value, AP_Value, description_Value, website_Value, email_Value, PN_Value, OH_Value, CI_Value] -- GitLab