diff --git a/.idea/Porchfest-main.iml b/.idea/Porchfest-main.iml
index 2705ef6..7202350 100644
--- a/.idea/Porchfest-main.iml
+++ b/.idea/Porchfest-main.iml
@@ -5,7 +5,7 @@
-
+
\ No newline at end of file
diff --git a/Trumansburg_Porchfest_Registration.csv b/Trumansburg_Porchfest_Registration.csv
index bfd8a0e..2b1cd79 100644
--- a/Trumansburg_Porchfest_Registration.csv
+++ b/Trumansburg_Porchfest_Registration.csv
@@ -1,45 +1,36 @@
-Timestamp,Band name,Band hometown,Band & music description,Band photo/logo,Facebook,Spotify link,Website link,Preferred time slots [12 pm],Preferred time slots [1 pm],Preferred time slots [2 pm],Preferred time slots [3 pm],Preferred time slots [4 pm],Preferred time slots [5 pm],Address,Are your performers in any other bands? Please let us know so that they aren't scheduled at the same time.,Genre
-,Janet Batch,,,https://i0.wp.com/essentiallypop.com/epop/wp-content/uploads/2021/09/Janet-Batch-scaled.jpeg?fit=2560%2C1437&ssl=1,https://www.facebook.com/JanetBatchMusic/,https://open.spotify.com/artist/3tSNdwKX02fGoIBRwdOkeJ,,Yes,,,,,,9 McLallen St.,,country
-,Loveday,,,,https://www.facebook.com/thisisloveday/,https://open.spotify.com/artist/1jshSvQwxlZL9W1FF07pwz,,Yes,,,,,,31 Washington St.,,folk
-,Rena Guinn,,,https://images.squarespace-cdn.com/content/v1/54d531ade4b0fa3826c2436e/1632275419530-J4RXLICYJFJ4O5NJG1M4/Rena+Guinn+Photo.JPG?format=1500w,https://www.facebook.com/pages/category/Musician-band/Rena-Guinn-Music-349161816153268/,,,Yes,,,,,,36 Cayuga St,,"folk,blues,country"
-,Brett Beardslee,,,https://i.ytimg.com/vi/X_5A1-BGUWA/hqdefault.jpg,https://www.facebook.com/brett.beardslee.3,https://open.spotify.com/artist/5IcYB3MTLpQ0RGlERJOqZA,,Yes,,,,,,19 Bradley St.,,country
-,Metasequoia,,,"https://static.wixstatic.com/media/14dcc5_2979f55ae7e14c8e87e0c6c083637423~mv2.jpg/v1/fill/w_640,h_216,al_c,q_80,usm_0.66_1.00_0.01,enc_auto/14dcc5_2979f55ae7e14c8e87e0c6c083637423~mv2.jpg",https://www.facebook.com/metasequoiamusic/,https://open.spotify.com/artist/0xwIJY8g7M2P0z1HVA16gu?si=ubsRX0jFRxSMpBR5QDm7Vw,metasequoiamusic.com,Yes,,,,,,95 E. Main St.,,rock
-,Vicious Fishes,,,https://i.scdn.co/image/ab6761610000e5eb69980c974fd0dfefeee507af,https://www.facebook.com/theviciousfishes/,https://open.spotify.com/artist/2gt7faISfVU7K5N18HA9tM,,Yes,,,,,,28 Whig St,,rock
-,Motherwork,,,https://i.ytimg.com/vi/-a_JFr_Ax18/maxresdefault.jpg,https://www.facebook.com/motherwortband,,https://www.allmusic.com/artist/motherwort-music-mn0003014238,,,,,,,54 Hector St.,,"folk,rock,pink"
-,,,,,,,,,,,,,,,,
-,Trumansburg HS Modern Band 3A,,,https://cmsv2-assets.apptegy.net/uploads/5421/logo/1717/Trumansburg_Logo_color.png,,,,,Yes,,,,,5 McLallen St.,,
-,gasDog,,,,https://www.facebook.com/gasdogmusic/,,,,Yes,,,,,37 Washington St.,,rock
-,Adam Guinn,,,https://i.ytimg.com/vi/-XeUMxeOs4w/maxresdefault.jpg,https://www.facebook.com/adamguinnmusic/,https://open.spotify.com/artist/3u2ced1cI3JY9G6c8iDBRu,,,Yes,,,,,36 Cayuga St,,"rock,country, blues, folk"
-,Dart Brothers,,,,,https://soundcloud.com/thedartbrothers,https://dartbrothers.com/,,Yes,,,,,11 South St.,,rock
-,Roots Relic,,,https://i1.sndcdn.com/artworks-000062015313-u1cl2v-t240x240.jpg,https://www.facebook.com/Roots-and-Relics-on-WQFS-391505857894052/,https://soundcloud.com/roots-relic,https://rootsrelic420.bandcamp.com/,,Yes,,,,,50 Hector St.,,rock
-,Soul Benders,,,https://d10j3mvrs1suex.cloudfront.net/u/376130/69b76fe8888c3c2d444bcc89b72ebc7d791d0a2d/original/img-4935.jpg/!!/b%3AW1siZXh0cmFjdCIseyJsZWZ0Ijo2NCwidG9wIjowLCJ3aWR0aCI6Mzg0LCJoZWlnaHQiOjM4NH1dLFsicmVzaXplIiw1MTJdLFsibWF4Il0sWyJ3ZSJdXQ%3D%3D/meta%3AeyJzcmNCdWNrZXQiOiJiemdsZmlsZXMifQ%3D%3D.jpg,https://www.facebook.com/thesoulbenders/,,https://thesoulbenders.com/home,,Yes,,,,,110 E. Main St.,,"blues, soul, rock"
-,The Flocked Bear,,,,,,,,Yes,,,,,118 E. Seneca St.,,"jazz, funk "
-,Rarendanix,,,,,,,,Yes,,,,,11 Whig St.,,"pop, rock"
-,Evan Stewart & The Flunk School,,,https://www.stage32.com/sites/stage32.com/files/imagecache/head_shot_500/headshots/05b473c47cfb9f5415855ce9b7d93816_1378377416_l.jpg,,https://soundcloud.com/evan-stewart-eisenberg/sets/evan-and-the-flunk-school,https://theflunkschool.bandcamp.com/,,Yes,,,,,24A Prospect St.,,"folk,rock"
-,Florencia,,,,,https://florenciaulloa.bandcamp.com/,,,Yes,,,,,21 Washington St,,rock
-,,,,,,,,,,,,,,,,
-,Trumansburg HS Jazz Band,,,https://cmsv2-assets.apptegy.net/uploads/5421/logo/1717/Trumansburg_Logo_color.png,,,,,,Yes,,,,5 McLallen St,,
-,The 86ers,,,https://i.ytimg.com/vi/8LoLP9f_1ms/maxresdefault.jpg,https://www.facebook.com/86ersband/,https://open.spotify.com/artist/075GBu6aADQQqm7sjhIkRM,,,,Yes,,,,35 Washington St,,rock
-,Cayuga Blue Notes,,,,https://www.facebook.com/Cayuga-Blue-Notes-1389594284647809/,https://open.spotify.com/track/7Gs3otHnZDq514kFHf0nx7,http://www.cayugabluenotes.com/,,,Yes,,,,33 Cayuga St,,"country, blues"
-,Sing Trece,,,"https://static.wixstatic.com/media/d394fe_ffdd9eff50a943a0bda69de4b9731e6b~mv2_d_4898_3265_s_4_2.jpg/v1/crop/x_660,y_468,w_2007,h_2119/fill/w_560,h_592,al_c,q_80,usm_0.66_1.00_0.01,enc_auto/SingTrece.jpg",https://www.facebook.com/Singtrece,,https://www.singtrece.com/,,,Yes,,,,6 Bradley St,,Ithaca's faves
-,Vinegar Williams,,,,https://www.facebook.com/vinegarwilliams,https://open.spotify.com/artist/6Vdy6Ge6FttRZvTWFIoR77,https://www.williams-sonoma.com/shop/food/vinegars/,,,Yes,,,,95 E. Main St,,rock
-,Boomslang,,,,,,,,,Yes,,,,66 Cayuga St,,rock
-,,,,,,,,,,,,,,,,
-,Trumasburg HS Modern Band 2A,,,https://cmsv2-assets.apptegy.net/uploads/5421/logo/1717/Trumansburg_Logo_color.png,,,,,,,Yes,,,21 Congress St.,,
-,two_oranges,,,,https://www.facebook.com/teddyktwooranges/,https://open.spotify.com/artist/4DyCP916WXLOQtW76wsH7t,,,,,Yes,,,21 Washington St,,hip-hop
-,Comfort Hill,,,,,,,,,,Yes,,,7 Strowbridge St.,,"Americana, country, rock"
-,TOiVO,,,,https://www.facebook.com/toivo.band/,,http://toivo.honkingduck.com/,,,,Yes,,,33 Cayuga St.,,Old World
-,Dame's Rocket,,,,https://www.facebook.com/damesrocketband/,,,,,,Yes,,,6 Bradley St,,etheral fem-folk
-,Mysa,,,,https://www.facebook.com/MYSAMusic/,,,,,,Yes,,,95 E. Main St.,,funk duo
-,Freight,,,https://www.smliv.com/downloads/514/download/freighthoppers.jpg?cb=a7d9367242fb1220b9d987a37f1d5918,https://www.facebook.com/thefreightband/,https://open.spotify.com/artist/42OwGWSjwWMc0PlMSgml0A,https://www.thefreightband.com/,,,,Yes,,,24A Prospect St.,,"rock, folk, funk"
-,Se Leighas,,,,https://www.facebook.com/seleigheas/,,,,,,Yes,,,5 McLallen St,,traditional Celtic
-,,,,,,,,,,,,,,,,
-,Trumansburg HS Senior Modern Band,,,https://cmsv2-assets.apptegy.net/uploads/5421/logo/1717/Trumansburg_Logo_color.png,,,,,,,,Yes,,21 Congress St,,
-,Grassanova,,,https://live.staticflickr.com/904/41146538595_82a9d34e13_b.jpg,https://www.facebook.com/GrassanovaBluegrass/,,https://www.ithaca.com/calendar/music/grassanova/event_89cfb046-232d-11ea-ab82-a39539a7c4de.html,,,,,Yes,,25 Washington St,,"rock, bluegrass, folk"
-,Harry Nochols,,,https://f4.bcbits.com/img/0011038723_10.jpg,https://www.facebook.com/HarryNicholsMusic,https://harrynichols.bandcamp.com/,,,,,,Yes,,22 Strowbridge St,,pop
-,Patchwork Down,,,https://i1.sndcdn.com/artworks-000418247328-i3xkvv-t500x500.jpg,https://www.facebook.com/pages/category/Musician-band/Patchwork-Down-236140140345486/,https://soundcloud.com/jrock713-1/sets/patchwork-down-songs,http://ithacamusic.net/org.php?id=427,,,,,Yes,,39 Cayuga St,,rock
-,Maddy & The Vaccinators,,,,,,,,,,,Yes,,19 Bradley St,,rock
-,Feed the Fire!,,,,https://www.facebook.com/FeedTheFireNY/,https://feedthefireofficial.bandcamp.com/,http://www.feedthefireband.com/,,,,,Yes,,8 South St,,"rock, funk, reggae"
-,Singing Notes and Slining Jokes,,,https://cdn.evbuc.com/images/254499559/11163550643/1/original.20220325-143149,https://www.facebook.com/singingnotesandslingingjokes/,,,,,,,Yes,,42 Whig St,,"music, song, stories"
-,Lynn & George,,,,,,,,,,,Yes,,5 McLallen St,,blues
-,Bob Roberts Calmity,,,https://i.ytimg.com/vi/FIps5tTH9CQ/maxresdefault.jpg?v=600e2414,https://www.facebook.com/bobrobertscalamity/,,http://ithacamusic.net/org.php?id=182,,,,,Yes,,95 E. main St,,rock
\ No newline at end of file
+Timestamp,Band name,Band & music description,Band photo/logo,Address,Genre,Preferred time slots [12 pm],Preferred time slots [1 pm],Preferred time slots [2 pm],Preferred time slots [3 pm],Preferred time slots [4 pm],,Facebook,Spotify link,Website link
+,Rena Guinn,"folk, blues & country",https://cdn.porchfest.live/trumansburg-2022/rena-guinn.jpg,36 Cayuga St.,"folk, blues, country",,Yes,,,,,,https://open.spotify.com/artist/4TmT769kLPPsPKoTl8LKaR?si=cbjWwZkbTKS2MiuVZkcTWg,
+,SingTrece,Ithaca’s faves,https://cdn.porchfest.live/trumansburg-2022/singtrece.jpg,88 East Main,soul,,Yes,,,,,,https://open.spotify.com/artist/1aEpXtDYsW2HaAuxNLFvde?si=ST7e_vMdQXecHPP2dQzlRw,https://www.singtrece.com
+,two oranges,hip-hop,https://cdn.porchfest.live/trumansburg-2022/two-oranges.jpg,21 Washington St.,hip-hop,,Yes,,,,,,https://open.spotify.com/artist/6cUdWT6f1oZiKyYHsEgTbB,http://twooranges.hearnow.com
+,Phred & The Phamily Phunkshun,musical puppet show,,30 McLallen St.,kids,,Yes,,,,,,,
+,George Cook & Friends,blues,,5 McLallen St,blues,,Yes,,,,,,,
+,Danny Speer & Friends,"folk, country, rock, jazz",https://cdn.porchfest.live/trumansburg-2022/danny-speer.jpg,19 Cayuga St.,"folk, country, rock, jazz",,Yes,,,,,,,https://www.youtube.com/channel/UCywv9Rk7dlHuTzH6KmbwHdg
+,Boomslang,rock,,66 Cayuga St.,rock,,Yes,,,,,,,
+,Tburg HS Modern Band,rock,https://cdn.porchfest.live/trumansburg-2022/trumansburg-hs.png,21 Congress St.,rock,,Yes,,,,,,,
+,Adam Guinn,"grunge, rock, country blues & folk",https://cdn.porchfest.live/trumansburg-2022/adam-guinn.jpg,36 Cayuga St.,"grunge, rock, folk",Yes,,,,,,,https://open.spotify.com/artist/3u2ced1cI3JY9G6c8iDBRu,https://adamguinnmusic.com
+,Se Leigheas,traditional Celtic,https://cdn.porchfest.live/trumansburg-2022/se-leigheas.jpg,5 McLallen St.,celtic,Yes,,,,,,https://www.facebook.com/seleigheas,,
+,Brett Beardslee,American road music,https://cdn.porchfest.live/trumansburg-2022/brett-beardslee.jpg,19 Bradley St.,rock,Yes,,,,,,https://www.facebook.com/brett.beardslee.3,,
+,David Graybeard Band,"Americana, blues & roots",https://cdn.porchfest.live/trumansburg-2022/david-graybeard.jpg,21 Washington St.,"americana, blues",Yes,,,,,,,https://open.spotify.com/artist/6571pp7gW9siB12JcrSOr9,https://davidgraybeard.com
+,The Dart Brothers,dad-rock & Americana,https://cdn.porchfest.live/trumansburg-2022/dart-brothers.jpg,11 South St.,"rock, americana",Yes,,,,,,,https://open.spotify.com/artist/4tyJlnbhfN7GeqCGrvbLdw,https://dartbrothers.com
+,Figure 8,rock,https://cdn.porchfest.live/trumansburg-2022/figure-eight.jpg,21 Congress St.,rock,Yes,,,,,,,,
+,All Strung Out Trio,"popular 20th century, all genres",https://cdn.porchfest.live/trumansburg-2022/all-strung-out.jpg,50 Hector St.,,Yes,,,,,,,,https://allstrungout.mystrikingly.com
+,The Soul Benders,"blues, soul & rock",https://cdn.porchfest.live/trumansburg-2022/all-strung-out.jpg,110 East Main St.,"blues, soul",,,Yes,,,,,https://open.spotify.com/artist/1e0xkB1aw9KA8uDeI65Gom,https://thesoulbenders.com
+,Ghost Train,acoustic rock & blues,https://cdn.porchfest.live/trumansburg-2022/ghost-train.jpg,43 Whig Street,"rock, blues",,,Yes,,,,,,
+,Freight,"rock, folk & funk",https://cdn.porchfest.live/trumansburg-2022/freight-music.jpg,24A Prospect St.,"rock, folk, funk",,,Yes,,,,https://www.facebook.com/FreightIthaca,,https://www.freightmusic.com
+,Cayuga Blue Notes,country blues,https://cdn.porchfest.live/trumansburg-2022/cayuga-blue-notes.jpg,33 Cayuga St.,"country, blues",,,Yes,,,,,,http://www.cayugabluenotes.com
+,Louiston,indie-folk,https://cdn.porchfest.live/trumansburg-2022/louiston.jpg,25 Washington St.,"folk, alternative ",,,Yes,,,,,https://open.spotify.com/artist/39vg8AyEoSiJRrPuwm5VtV?si=QorGY91QT8S9dW8DIG7zCQ,https://louistonmusic.com
+,HS Jazz Band,jazz,https://cdn.porchfest.live/trumansburg-2022/trumansburg-2.jpg,5 McLallen St.,jazz,,,Yes,,,,,,
+,Dickie Starfish Allstars,dad-rock,https://cdn.porchfest.live/trumansburg-2022/dickie-starfish-allstars.jpg,30 McLallen St.,"rock, alternative",,,Yes,,,,https://www.facebook.com/DickieStarfish,,
+,Hula Hut Polynesian Dance,hula dance,https://cdn.porchfest.live/trumansburg-2022/hula.jpg,25 Washington St.,hula,,,,Yes,,,,,
+,TOiVO,old world dance music,https://cdn.porchfest.live/trumansburg-2022/toivo.jpg,33 Cayuga St.,dance music,,,,Yes,,,,,http://toivo.honkingduck.com
+,Ariel Arbisser,R&B/Soul,https://cdn.porchfest.live/trumansburg-2022/ariel.jpg,24A Prospect St.,Soul,,,,Yes,,,https://www.facebook.com/ArielArbisser/,https://open.spotify.com/artist/5iuD9ZShZ7turKu93Ghw6G?autoplay=true,https://www.arielarbisser.com
+,Jasperoo,instrumental Americana,https://cdn.porchfest.live/trumansburg-2022/jasperoo.jpg,5 McLallen St.,americana,,,,Yes,,,,,https://jasperoo.bandcamp.com
+,Mario il Basso,opera & pop vocals,https://cdn.porchfest.live/trumansburg-2022/mario.jpg,37 Pease St.,opera,,,,Yes,,,,,http://mario-il-basso.com
+,Harry Nichols,acoustic pop originals,https://cdn.porchfest.live/trumansburg-2022/HarryNichols.jpg,22 Strowbridge St.,pop,,,,Yes,,,,https://open.spotify.com/artist/34fprHhDjEIVlUgWxN0gjb?si=-WcU4ABORaShZC9ZokkEDw,https://linktr.ee/HarryNicholsMusic
+,Feed the Fire!,"psych-rock, funk & reggae",https://cdn.porchfest.live/trumansburg-2022/FeedTheFire.jpeg,8 South Street,"rock, funk, reggae",,,,,Yes,,https://www.facebook.com/FeedTheFireNY,https://open.spotify.com/artist/0Ena7QPdKTzIVNZ8oKa8Bz?si=yWytzGvNR6-eJvQyWbHIQA,www.feedthefireband.com
+,Loveday,"alternative, folk",https://cdn.porchfest.live/trumansburg-2022/Loveday.jpeg,31 Washington St.,"alternative, folk",,,,,Yes,,,,https://www.reverbnation.com/ladyloveday
+,Patchwork Down,rock,https://cdn.porchfest.live/trumansburg-2022/PatchwordDown.jpeg,39 Cayuga Street,rock,,,,,Yes,,http://Facebook.com/236140140345486/,https://open.spotify.com/artist/6Y2taA2dwe4E1y9oyZiFL4?si=rtGExmJ7R8OGjs1hTqGP6g,
+,Singing Notes & Slinging Jokes,"music, song & stories",https://cdn.porchfest.live/trumansburg-2022/Kenneth.jpeg,42 Whig St.,"music, song, stories",,,,,Yes,,https://www.facebook.com/KennethMclaurinComedian/,https://open.spotify.com/artist/7AJxFb6llMBk9Z6DdGXSJS,https://www.kennethmclaurin.com
+,The Blind Spots,moxy-rock,https://cdn.porchfest.live/trumansburg-2022/TheBlindSpots.jpeg,19 Bradley St.,rock,,,,,Yes,,https://www.facebook.com/maddywalshandtheblindspots,https://open.spotify.com/artist/2C8KpABTNjFGjY9JUWczTc,https://www.theblindspots.com
+,Truth Decay,rock originals,https://cdn.porchfest.live/trumansburg-2022/TruthDecay.jpeg,16 Washington St.,rock,,,,,Yes,,https://www.facebook.com/truth.decay.ithaca,,
+,Comfort Hill,"Americana, alt-country & rock",https://cdn.porchfest.live/trumansburg-2022/ComfortHill.jpeg,7 Strowbridge St.,"americana, alt-country, rock",,,,,Yes,,https://www.facebook.com/DrewMinsonBand/,,https://www.youtube.com/channel/UCCemFjputnZr_5tSPr6EahQ
\ No newline at end of file
diff --git a/app/artist_routes.py b/app/artist_routes.py
index 3c74a0b..8bdd512 100644
--- a/app/artist_routes.py
+++ b/app/artist_routes.py
@@ -12,13 +12,15 @@ def get_slug_artist(slug):
if info is not None:
user = User.query.filter_by(access_token=info.get('access_token')).first()
artist_data = Artist.query.filter_by(url_slug=slug).first_or_404()
+ artist_porch = ArtistToPorch.query.filter_by(artist_id=artist_data.id).first()
+ artist_location = Porch.query.filter_by(id=artist_porch.porch_id).first()
if user:
favoriteArtist = UserToArtist.query.filter(UserToArtist.artist_id == artist_data.id,
UserToArtist.user_id == user.id).first()
if favoriteArtist is not None:
- result = {"artist": artist_data.to_dict(), 'liked': favoriteArtist.favorite}
+ result = {"artist": artist_data.to_dict(), 'liked': favoriteArtist.favorite, 'location': artist_location}
return jsonify(result)
- result = {"artist": artist_data.to_dict()}
+ result = {"artist": artist_data.to_dict(), 'location': artist_location.address}
return jsonify(result)
diff --git a/app/log_reg_routes.py b/app/log_reg_routes.py
index ad30c04..fa8e769 100644
--- a/app/log_reg_routes.py
+++ b/app/log_reg_routes.py
@@ -56,7 +56,8 @@ def signup():
username=username[0],
email=email,
password_hash=generate_password_hash(password),
- geoTrackUser=info.get('geo_Tracking')
+ geoTrackUser=info.get('geo_Tracking'),
+ blurSetting=True
)
db.session.add(user)
diff --git a/app/models.py b/app/models.py
index c230a3c..4d8574d 100644
--- a/app/models.py
+++ b/app/models.py
@@ -17,6 +17,7 @@ class User(UserMixin, db.Model):
access_token = db.Column(db.String(512), index=True, unique=True)
refresh_token = db.Column(db.String(512), index=True, unique=True)
geoTrackUser = db.Column(db.Boolean, default=False)
+ blurSetting = db.Column(db.Boolean, default=True)
def __repr__(self):
return ''.format(self.username)
@@ -32,6 +33,7 @@ def to_dict(self, include_email=False):
'id': self.id,
'username': self.username,
'geoTrackingUser': self.geoTrackUser,
+ 'blurSetting': self.blurSetting,
}
if include_email:
diff --git a/app/routes.py b/app/routes.py
index 9cdc623..1cb9ca1 100644
--- a/app/routes.py
+++ b/app/routes.py
@@ -10,6 +10,7 @@
@app.route('/')
def index():
+ ##main route
all_artists = Artist.query.order_by(Artist.name.asc()).all()
artists_list = []
for artist in all_artists:
@@ -219,19 +220,30 @@ def add_csv():
if df.iloc[i, 1] != '':
# Add artist
artist = Artist(name=df.iloc[i, 1], hometown="Trumansburg",
- about="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. ",
- photo=df.iloc[i, 4], spotify=df.iloc[i, 6], website=df.iloc[i, 7],
- facebook=df.iloc[i, 5])
+ about=df.iloc[i, 2],
+ photo=df.iloc[i, 3], spotify=df.iloc[i, 13], website=df.iloc[i, 14],
+ facebook=df.iloc[i, 12])
db.session.add(artist)
db.session.commit()
# Google Maps API to get lat and long?
# Add porch
- # if df.iloc[i, 8]: #time
- date = datetime.strptime('11 April, 2012', '%d %B, %Y')
- addr = df.iloc[i, 14]
+ date = datetime.strptime('11 June, 2022', '%d %B, %Y')
+ addr = df.iloc[i, 4]
geoLocation = geocoder.osm(addr + " Trumansburg, NY")
- porch = Porch(address=addr, time=date.replace(hour=random.randrange(12, 17)),
+ # 6,7,8,9,10 --- 12,1,2,3,4
+ timePlaying = -1
+ if df.iloc[i, 6] != '':
+ timePlaying = 12
+ elif df.iloc[i, 7] != '':
+ timePlaying = 1
+ elif df.iloc[i, 8] != '':
+ timePlaying = 2
+ elif df.iloc[i, 9] != '':
+ timePlaying = 3
+ elif df.iloc[i, 10] != '':
+ timePlaying = 4
+ porch = Porch(address=addr, time=date.replace(hour=timePlaying),
latitude=geoLocation.current_result.geometry['coordinates'][1],
longitude=geoLocation.current_result.geometry['coordinates'][0])
db.session.add(porch)
@@ -241,7 +253,7 @@ def add_csv():
db.session.add(artistToPorch)
db.session.commit()
- cur_artist_genres = df.iloc[i, 16] # List of genres
+ cur_artist_genres = df.iloc[i, 5] # List of genres
if cur_artist_genres != "":
genres_list = cur_artist_genres.split(",")
for genre in genres_list:
diff --git a/app/user_routes.py b/app/user_routes.py
index 3e52205..def5a69 100644
--- a/app/user_routes.py
+++ b/app/user_routes.py
@@ -16,7 +16,7 @@ def user_profile():
identity = get_jwt_identity()
user = User.query.filter_by(id=identity).first()
if user:
- return jsonify({"email": user.email, "trackLocation": user.geoTrackUser}), 200
+ return jsonify({"email": user.email, "trackLocation": user.geoTrackUser, "blurSetting": user.blurSetting}), 200
return jsonify(None)
@@ -73,6 +73,22 @@ def update_user_geo_tracking():
return jsonify(None)
+@app.route('/update_user_blur_setting', methods=['GET'])
+@jwt_required()
+def update_user_blur_setting():
+ if get_jwt_identity() is not None:
+ identity = get_jwt_identity()
+ user = User.query.filter_by(id=identity).first()
+ if user:
+ if user.blurSetting:
+ user.blurSetting = False
+ else:
+ user.blurSetting = True
+ db.session.commit()
+ return jsonify(user.blurSetting)
+ return jsonify(None)
+
+
@app.route('/delete_user', methods=['POST'])
@jwt_required()
def delete_user():