An application that creates and displays user's family tree written in Django.
- Language: Python 3.8
- Framework: Django
- Database: MariaDB
- OS: Ubuntu Server LTS
- IDE: PyCharm (optional)
This web application creates family trees, where users can mangage and edit information on them.
Main features that are currently implemented are:
- There are models for person, name, partnerships, location (birth & death), and users
- Users can create and manage their family trees
- Users can add people and partnerships which will generate trees
- Profiles will be made for each person created
- Admin users can manage users
To get this web application working:
- Set up a Python environment. Recommended to use venv.
- Assuming you have Python setup, run the following commands (if you're on Windows you may use
py
orpy -3
instead ofpython
to start Python):
pip3 install -r requirements.txt
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py createsuperuser # Create a superuser
python3 manage.py runserver
- Open a tab to
http://127.0.0.1:8000/admin/
to open the admin site - Open tab to
http://127.0.0.1:8000
to see the main site.
This is the default Django address. Django is able to run on any IP address and port.
python3 manage.py runserver <your IP address>:<desired port>
Django-allauth requires uses the database to store authentication information; this is highly convenient with regards to git, since it means that there is no chance of accidentally committing private information. In order to set up your installation with this feature, you will need an Google API application with Client ID and key. See the Google developer console to make a new project.
Briefly, here's what you need in terms of the Google API:
- A new project
- An OAuth consent screen, set up with at least an application name and support email.
- OAuth Credentials for web with the following options:
- The root of the site added as an origin URI. For a local install, this will be
127.0.0.1:8000
. [site root]/accounts/google/login/callback
added to redirect URIs. For a local install this will behttp://127.0.0.1:8000/accounts/google/login/callback/
.
- The root of the site added as an origin URI. For a local install, this will be
The Google Console will need further configuration in a production environment.
In the admin page (/admin
):
- Add a new "Site" (under "Sites"). If you are running the server locally, the domain name will be
127.0.0.1:8000
; the display name is usually the same. - Add a new "Social Application." Pick "Google", as the provider. Type "Google API" as the name. Type your Client id and your Secret key in the appropriate boxes. Add the site you added in step 1 to the Choses sites.
If the application does not work, please check to see if there is migrations
folder inside the webapp
folder.
If there isn't, please make a migrations
folder inside the webapp
folder.
Then, create a file called __init__.py
and place it inside the migrations
folder.
- Ben Philips
- Cynthia Ha
- Tri Minh Duong
This project is licensed under the GNU General Public License v3.0 License - see the LICENSE file for details