Jump to: navigation, search

GEPS 013: Gramps Webapp

1,047 bytes added, 23:03, 22 September 2019
no edit summary
{{man warn|This has been abandoned|Please see for future attempts}}
Many Gramps users would like to collaborate or share their genealogy data on the web. This GEP describes a webapp, a web-based application that runs in your browser, and requires a server.
A prototype is now(2009) was on-line from Nov.2009 to Sept.2016 at {{Dead link|url=}} which is was running trunk on a sample database . You could log into the site, as a:*superuser (id=admin, password=gramps)or a *regular user (id=admin1, password=gramps)or just view as an anonymous userThere are two additional pages on this project: * [[Gramps-Connect]] - getting started* [[Gramps-Connect: Developer Introduction]] - introduction for developers
== Motivation ==
Here is a small list of goals:
# Create a fullscale GRAMPS Gramps web framework
# Allow multiple users via the standard web browser
## Users will log in and have various levels of permissions
# Build on GRAMPS Gramps codebase and wealth of resources
## Reports
## Tools
=== Models/Views ===
Here is the model that defines the Person table from [http://{{Code Base}} srcgramps/webwebapp/grampsdb/]:
% cd trunk
% PYTHONPATH=src DJANGO_SETTINGS_MODEL=webwebapp.settings python >>> from webwebapp.grampsdb.models import Person
>>> Person.objects.all()
[<Person>, <Person>, ...]
The first retrieves all of the rows for the Person table; the second retrieves just the one record that has the unique, primary key 1, and the third retrieves the single record that has the unique handle of 'gh71234dhf3746347734'. Note that we never connected onto a database... Django is (currently) define to connect on to one database, and it does it on import. The database is set in srcgramps/webwebapp/
An alternative method of interactively talking to the database is to use '''':
% cd trunkmaster/srcgramps/web webapp % PYTHONPATH=../../src gramps python shell
>>> from webwebapp.grampsdb.models import *
>>> Person.objects.filter(gender_type=1)
[<Person>, <Person>, ...]
The double-underscore in the keyword "gender_type__name" of the filter method is a Django convention. It means "replace wth with the correct syntax". If Python allowed it, it would be written as '''Person.objects.filter("Male")''' but that is not legal syntax.
==== Model overview ====
Here is an overview of all of the models and how they are related:
{{stub}}{{man tip| 1=To update this (Gramps 3.x and earlier) |2=To see more graphical representations of the data, run "make docs" in the src/webwebapp/ directory, and then look in src/webwebapp/docs/.}} * [ Gramps DbDjango]
=== Templates ===
Templates are used to describe ''what'' to display. Here is a template from [{{Code Base}}data/templates/main_page.html?view=markup src/data/templates/main_page.html]:
=== Getting Started with Gramps in Django ===
A prototype of a GRAMPS Gramps Django webapp is now in trunk and gramps32. To run it, do the following:
# Download Django. You'll need version 1.13 or greater
## On yum-based systems, try "yum install Django"
## On apt-based systems, try "sudo apt-get install python-django"
## Other systems: get the sources from
# get clone the gramps trunk Git repository and checkout either the gramps32 or master branch/gramps32 from SVN# cd trunk/src/web/ (or gramps32)
# Build the database, and load with default data:
## make clean
## cd ../..
## python src/
# Download the Django Import/Export Addon from [[3.2_Addons3_Addons]]
# Run the Django Exporter
## Select Family Tree -> Export
## python src/
# Run the Django Importer
## Select Family Tree -> Import [[Image:DjangoImportExport.jpg|thumb|right|150px]]
## Select the "import.django" (from above) as the file to import
There are two subdirectories and two files of interest to the Gramps webapp:
#{{Code Base}}data/templates/ - HTML templates#{{Code Base}}gramps/trunk/src/webwebapp/ - Webapp main directory##{{Code Base}}gramps/trunk/src/webwebapp/ - library interface##{{Code Base}}gramps/trunk/src/webwebapp/grampsdb - gramps table models# - Exporter# - Importer
== Roadmap ==
=== Concurrent Edits ===
Concurrent access for write and read imply several problems when people by accident change the same objects at the same time. GRAMPS Gramps itself has an elaborate signal handling for cases when dialogs are open with no longer current information. In a web environment, this becomes more difficult however. This is not built into Django.
For discussion on this issue in Django, see:
* [ Django User Question]
** [ Developer discussion on topic]
== Example GMS Web Sites ==
Genealogy Management Systems on the web:
** for example: []. (PhpGedView)
: Note here: the intro page is a collection of gadgets/controls, which then link into the real data.
* , (webtrees)* (HuMogen)* (Généamania)* (Geneotree)* http://ancestorsnow.86com/bgrancestors* http:/BGR-o/p316www.phpmyfamily.htmnet/demo/* http://beckwww.frog.orgza.ilnet/humogenfamily/surname-list.php ([[Other_genealogy_tools#Gramps-php-exporter|gramps-php-exporter]])
Collaborative database (user/wizard/password):
** ([ beta][])* (alpha[]) Source oriented: * [][]
==See also==
*[[Gramps-Connect: Introduction|gramps-connect]]

Navigation menu