uchicago-sg / caravel

A Re-Re-Refresh the UChicago Marketplace
https://marketplace.uchicago.edu
16 stars 3 forks source link

Switch from DB to NDB #190

Closed fatlotus closed 8 years ago

fatlotus commented 8 years ago

This breaks, er, everything, but I think it also helps reduce overall code complexity. Thoughts on the Mixin pattern? Primary changes:

  1. Switch from DB (with manual caching) to NDB (with native caching).
  2. Serializable Principals (see #189) and Apps login features.
  3. Deleting 1ksloc of code from Marketplace.
  4. A moderation interface (at /moderation) for unvalidated Inquiries and Listings. Right now it's everything, but we can update to include all-by-Device.

Don't worry- while you're reviewing, I'll be working on adding more tests :)

georgeteo commented 8 years ago

Is there a security flaw? I can login as george.c.teo@gmail.com?

georgeteo commented 8 years ago

Okay. Check out some of my thoughts.

fatlotus commented 8 years ago

Oo, nice! Yeah, sorry, that was wayy too much code. From here on out smaller pull requests, promise :)

fatlotus commented 8 years ago

w.r.t. non-CNetID sellers — I intentionally disabled that feature, since there's no way for them to edit yet. I also want to be careful with any sort of access restriction changes.

(Not sure what to do with Hospital staff :<)

georgeteo commented 8 years ago

Whats the issue with editing?

fatlotus commented 8 years ago

I, er, haven't figured out how to let people edit listings yet.

I'm imaging that: ehe edit view could create an UnmoderatedListing, then submit it, get it moderated, then overwrite the old Listing using the same Key — but I haven't gotten that working yet. Or we could email the person, and have them moderate it, since they've now agreed to receive emails. Opinions?

georgeteo commented 8 years ago

(1) How would the user hold the Key to overwrite the old listing? (2) Email them as in send them a "You have changed your listing to 'foo', please approve this change" message, if approved then maybe back to our moderation queue?

fatlotus commented 8 years ago
  1. It'd get added as part of the edit flow
  2. Hm, that'd work. I'll work on that in a separate branch

Other than that?