system which can help a user define his family tree
Backend Coding Challenge for market pulse
- clone
cd familytree
pip3 install -r requirements.txt
# Note - better you do this using virtualenvwrapperpython manage.py runserver 0:8000
- go to
localhost:8000/admin
- login with
[email protected]/@Least8Chars
- create family members as you wish.
- for querying the data using ORM
8.1 go to terminal
8.2
cd familytree
8.3python3 manage.py shell
8.4from family.models import FamilyMember, Marriage
8.5 create object of FamilyMember 8.5.1fm = FamilyMember.objects.get(id=1)
8.5.2fm
8.5.3.dir(fm)
following queries need to be addressed
family-tree count immediate sons of <name>
family-tree count all daughters of <name>
family-tree count immediate cousins of <name>
family-tree count wives of <name>
family-tree is <name> and <name> related?
family-tree count uncles of <name>