Skip to content

Demo Data

Bill La Forge edited this page Aug 31, 2016 · 3 revisions

Demo configuration has been done by function calls and organized by tab/capability. Note that this is just a small step short from using edn files for initialization.

#Account Data

Account initialization is handled by welcome/demo.clj.

(users/add-user! "Fred" "fred" {:welcome {:full-name "Freddy Krueger"}
                                :contacts {}})
(users/add-user! "Sam" "sam" {:welcome {:full-name "Sam I Am"}
                              :contacts {}})
(users/add-user! "Kris" "kris" {:welcome {:full-name "Kris Kringle"}})

The data provided is the account name and password and the user data (possibly empty) for all the tabs/capabilities the user can access.

#Contacts Data

The initial data for the contacts tab/capability is handled by contacts/demo.clj.

(contacts/add-contact! {:first "Ben" :last "Bitdiddle" :email "benb@mit.edu"})
(contacts/add-contact! {:first "Alyssa" :middle-initial "P" :last "Hacker" :email "aphacker@mit.edu"})
(contacts/add-contact! {:first "Eva" :middle "Lu" :last "Ator" :email "eval@mit.edu"})
(contacts/add-contact! {:first "Louis" :last "Reasoner" :email "prolog@mit.edu"})
(contacts/add-contact! {:first "Cy" :middle-initial "D" :last "Effect" :email "bugs@mit.edu"})
(contacts/add-contact! {:first "Lem" :middle-initial "E" :last "Tweakit" :email "morebugs@mit.edu"})
Clone this wiki locally