- ID
- ca1d297e-764f-4c7d-90c7-93f448fee10b
- ROAM_ALIASES
- Attributes People
15Five Project: People Attributes
Demo day
Look at me, locking default attributes!
- Show off the 10 default attributes,
- We can lock them in Nazar's profile
And we can create new attributes
- Meat eater
But don't ask for the same information twice!
- Meat eater
- Veggie eater
And we can lock people out of them as well!
- Lock Meat Eater and demonstrate it on Nazar's account
Use script to generate variety of new attributes
#+BEGIN_SRC python
from ff.mods.attributes.utils.db import *
u1 = User.objects.get(email="paul@15five.com")
u2 = User.objects.get(email="nazar@15five.com")
c = u2.company
# Clear out existing attributes
c.people_attributes.filter(is_default=False).delete()
create_attribute(
company=c,
datatype="text",
name="Dots or stripes",
description="Are you spotty or linear?"
)
create_attribute(
company=c,
datatype="text",
name="Average shoe size",
description="This says a lot about you, watch out."
)
create_attribute(
company=c,
datatype="text",
name="Favorite LotR movie",
description="There is a right answer and you will be fired for being wrong."
)
create_attribute(
company=c,
datatype="date",
name="Last colonoscopy",
description="Not trying to pry, just making sure you’re being safe",
is_only_admin_editable=True,
)
create_attribute(
company=c,
datatype="date",
name="Preferred birthday",
description="When do you wish you were born?",
)
#+END_SRC