Changes

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 https://github.com/gramps-project/gramps-online 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 http://gramps-connect.org/ {{Dead link|url=http://gramps-connect.org/}} 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}}gramps.svn.sourceforge.net/viewvc/gramps/trunk/src/webwebapp/grampsdb/models.py?view=markup srcgramps/webwebapp/grampsdb/models.py]:
<pre>
<pre>
% cd trunk
% PYTHONPATH=src DJANGO_SETTINGS_MODEL=webwebapp.settings python >>> from webwebapp.grampsdb.models import Person
>>> Person.objects.all()
[<Person>, <Person>, ...]
</pre>
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/settings.py.
An alternative method of interactively talking to the database is to use ''manage.py'':
<pre>
% cd trunkmaster/srcgramps/web webapp % PYTHONPATH=../../src gramps python manage.py shell
>>>
</pre>
<pre>
>>> from webwebapp.grampsdb.models import *
>>> Person.objects.filter(gender_type=1)
[<Person>, <Person>, ...]
</pre>
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(gender_type.name="Male")''' but that is not legal syntax.
==== Model overview ====
Here is an overview of all of the models and how they are related:
[[Image:all-tables.gif]]
{{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/.}} * [https://gramps-project.org/docs/gen/gen_db.html#dbdjango Gramps DbDjango]
=== Templates ===
Templates are used to describe ''what'' to display. Here is a template from [http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/src/{{Code Base}}data/templates/main_page.html?view=markup src/data/templates/main_page.html]:
<pre>
=== 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 http://www.djangoproject.com/download/
# 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/gramps.py
# Download the Django Import/Export Addon from [[3.2_Addons3_Addons]]
# Run the Django Exporter
## Select Family Tree -> Export
## python src/gramps.py
# 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:
# http://gramps.svn.sourceforge.net/viewvc/gramps/trunk/src/{{Code Base}}data/templates/ - HTML templates# http://gramps.svn.sourceforge.net/viewvc/{{Code Base}}gramps/trunk/src/webwebapp/ - Webapp main directory## http://gramps.svn.sourceforge.net/viewvc/{{Code Base}}gramps/trunk/src/webwebapp/libdjango.py?view=markup - library interface## http://gramps.svn.sourceforge.net/viewvc/{{Code Base}}gramps/trunk/src/webwebapp/grampsdb - gramps table models# http://gramps-addons.svn.sourceforge.net/viewvc/gramps-addons/trunk/srccontrib/plugins/exportDjango/ExportDjango.py?view=markup - Exporter# http://gramps-addons.svn.sourceforge.net/viewvc/gramps-addons/trunk/src/pluginscontrib/importDjango/ImportDjango.py?view=markup - 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:
* [http://groups.google.com/group/django-users/browse_thread/thread/c138ec11c6ad282e?hl=en# Django User Question]
** [http://groups.google.com/group/django-developers/browse_thread/thread/fd5d45fc6cd6a760 Developer discussion on topic]
 
[[Category:GEPS|S]]
== Example GMS Web Sites ==
Genealogy Management Systems on the web:
* http://www.dertinger.de/Dertinger_database/en/en_index.htm(Oxy-gen)* http://phpgedview.sourceforge.net/demos.html for example: [http://www.admiraal.org/]. (PhpGedView)
: Note here: the intro page is a collection of gadgets/controls, which then link into the real data.
* http://webtrees.net/demo/next , (webtrees)* http://webtreesbeck.org.il/humogen/ (HuMogen)* http://genealogies.geneamania.net/showcaseservin/ (Généamania)* http://12www.46geneotree.com/geneotree/index.127php (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):
* http://roglo.eu/roglo?lang=en(GeneWeb)* http://gennus.org ([http://beta.gennus.org/en/page/about.html beta][http://beta.gennus.org/en/page/releasenotes.html])* http://brozer.fr (alpha[http://www.innovup.com/evenement/124/89-actualites-agenda.htm]) Source oriented: * http://solumslekt.org/forays/yggdrasil.php [http://code.google.com/p/yggdrasil-genealogy/][http://solumslekt.org/blog/]
==See also==
*[[Gramps-Connect: Introduction|gramps-connect]]
 [[Category:GEPS|SG]]

Navigation menu