MetaCell / geppetto-scidash

Geppetto scidash extension
2 stars 1 forks source link

Add demo models/tests for new users instead of them having no data at all #359

Open gidili opened 5 years ago

gidili commented 5 years ago

From @rgerkin: A new user has no models or tests as examples to look at, or to try out in the scheduler. I think I'd like to be able to give them some. I can choose what they'll be, and put them in the database under my name (or some demo user name). Would it be possible to add a hook to new user creation that then clones those demo models and tests to their account?

gidili commented 5 years ago

This is certainly possible as an additional feature, I don't think it's necessary to have them under any particular account, we just need to store them in the db as demo tests and models that every new user would get. It requires some design and some backend work to figure out what's the best place to trigger the creation of these records for the new users when the account is created without deviating from the patterns currently used. Also we might wanna hide these demo tests and classes from other users unless they get cloned and modified.

rgerkin commented 4 years ago

Maybe create a user named "_Demo" whose models/tests/records are automatically hidden in all searches. New user creation would call a hook that clones all items of _Demo to the new user. Changing which things a new user got would then be as simple as changing the owner of an object to "_Demo" in the admin console, which I could do periodically as I change my mind about what the demo content should be.