Open terabyte128 opened 8 years ago
just to clarify; what we got was that each scouting screen is called a "stage", and that at the end of each "stage", data is written to localstorage. At the end of each match, it attempts to post all data in localstorage to the server, then deletes it from localstorage if successful. @terabyte128
That's correct. Data will persist in local storage if it can't be pushed to the server; I also had a button on the home screen that would appear if cached data was left over, and let the user attempt to push it to the server again. Everything at that point is encoded as JSON.
Can you explain how pit scout image data is saved? (I know it doesn't have anything to do with match scouter, but it's been bugging me.)
@terabyte128
Yes, let's see... Normal data is sent off right to the database here. (note: some more validation here would be a good idea)
Images are uploaded to Imgur, to avoid dealing with storing them on our website. (We had some issues with it being blocked on school networks last year, might be a good idea to find an alternate host. Though if you can get away with not hosting images on your own server, I would highly recommend that.) The function for doing so is located here.
postFormData()
no matter if the upload succeeds or not (this was an inane design decision, it should probably notify the user of failure and then not transparently upload the rest of the data). <-- I actually think this was a mistake, and it should really just reset the progress bar and prompt them to try againpostFormData()
bundles up Imgur's response with the picture's URL, along with the rest of the form data, and submits it to our server, where it is processed as noted above. another note: you can probably use the same auth token for Imgur as we did, although uploading that to GitHub likely wasn't the best idea ;)
Yeah you guys left all your api keys in. I'm deleting them rn. :-P
Iirc, the imgur key was the only one I forgot about -- did you find something else (oh, and Google analytics) On Tue, Jan 26, 2016 at 3:22 PM Benjamin notifications@github.com wrote:
Yeah you guys left all your api keys in. I'm deleting them rn. :-P
— Reply to this email directly or view it on GitHub https://github.com/SaintsRobotics/frc-scout-2016/issues/3#issuecomment-175290023 .
Sam Wolfson
You left your django secret key in the default setup instructions, and yeah, google analytics.
That's not the same secret key actually on the server, it's a different local_settings.py, lol
@Precociuslydigital did you get the email I sent your regarding frc scout this year? (Sorry to hijack the issue)
@terabyte128 I have not been checking my email recently. Sorry, away from project temporarily, school and stuff. I'll look at that email, and also, did you ever have problems with csrf tokens?
@terabyte128 I also didn't see your email anywhere; where did you send that email?
@terabyte128 nevermind on the csrf front, apparently one of your message cookies screwed up the http headers.So you couldn't log out then log right back in again
Huh, I just tested logging out/immediately back in and didn't have any issues with CSRF verification. Not sure why the message cookies would be causing issues; they're built into Django so it seems like they would be designed to not conflict.
I sent the email to fellfromatree@gmail.com
Hi all,
I'm super happy that you've decided to work on porting FRC scout to this year's game. I'd just like to apologize for the complete mess that is match-scouting.js. If you have any questions about it, I can try and answer.
Sam