Skip to content

data overview

Diane Kaplan edited this page Nov 5, 2021 · 11 revisions

Data overview

0) Using the Django admin to add/edit records

You can use the django admin panel to directly add/edit/delete all the various records

1) overall setup

Branches:

Some relatives/users are only related to one part of the family, so we want to only show them people/images related to them. Define family branches in the admin UI as a way of (a) sorting people for clearer display and (b) showing each user the people they're related to. Typically you'll build your family tree out from a starting point (you!), and use four branches: one for each grandparent. You'll create these branches at the beginning, and they're used to help organize how the data is displayed, and to limit what a particular user will see.

Users:

We use Django's built-in functionality for users, password reset, etc

Profiles:

Then we use profiles to associate them with their person in the tree, set which branch(es) they have access to, and add other metadata for how they connect into the tree.

This primary use case is setting up users for family members you know and trust, who are connected with a specific person in the tree.

There is also the concept of a guest user: you can set up a guest user with access to particular branches, but they won't be linked to a specific person in the tree, and they'll only have access to family tree data where the person is no longer alive. (As done with other genealogy websites, living people will just show a 'living' placeholder, etc).

2) family tree

Person records

  1. We'll default to showing a person's given name(s) and last name, but if you'd like to use some other nickname you can update "display_name" field. (We show that instead, if it's populated)
  2. A person record has a 'sex' field, this value is not user-facing anywhere. This field is used to find descendants in the outline view:
  • for a person with sex 'F', the code will find families with that person id in the wife (aka partner1) field
  • for a person with sex 'M', the code will find families with that person id in the husband (aka partner2) field
  • a person with a different value won't show any descendant families on the outline page) I'll revisit this naming in a future version, but for now this is how the values map and what they do.

Family records

  • A family record has a 'wife' (aka partner1) and a 'husband' (aka partner2) field. This field is used to link two spouses/parents to the family, the 'wife' person is displayed on the left and the 'husband' person is displayed on the right. (But the 'wife' and 'husband' labels are not user-facing). In a future version I'll make it more flexible so a family isn't defined by two parents, but for now this is how the current fields are used.

3) Outline View

The 'Outline View' displays the families in an outline: starting with the 'first' families, then showing their children, the families made by those children, and so on. For all your earliest families, you'll set the Original Family field to 'Yes' in the admin page.

4) adding the good stuff

images, image_person

videos, video_person

notes