Changes

Jump to: navigation, search

GEPS 013: Gramps Webapp

369 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 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 can could log into the site, as a:
*superuser (id=admin, password=gramps) or a
*regular user (id=admin1, password=gramps)
=== Models/Views ===
Here is the model that defines the Person table from [http://svn.code.sf.net/p/gramps/code/trunk/{{Code Base}}gramps/webapp/grampsdb/models.py gramps/webapp/grampsdb/models.py]:
<pre>
</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/webapp/settings.py.
An alternative method of interactively talking to the database is to use ''manage.py'':
<pre>
% cd trunkmaster/srcgramps/webapp % PYTHONPATH=../../src gramps python manage.py shell
>>>
</pre>
</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/webapp/ directory, and then look in src/webapp/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://svn.code.sf.net/p/gramps/code/trunk/{{Code Base}}data/templates/main_page.html data/templates/main_page.html]:
<pre>
A prototype of a Gramps Django webapp is now in trunk and gramps32. To run it, do the following:
# Download Django. You'll need version 1.3 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
## 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/webapp/ - Webapp main directory## http://{{Code Base}}gramps.svn.sourceforge.net/viewvc/gramps/trunk/src/webapp/libdjango.py?view=markup - library interface## http://gramps.svn.sourceforge.net/viewvc/{{Code Base}}gramps/trunk/src/webapp/grampsdb - gramps table models
# http://gramps-addons.svn.sourceforge.net/viewvc/gramps-addons/trunk/contrib/Django/ExportDjango.py?view=markup - Exporter
# http://gramps-addons.svn.sourceforge.net/viewvc/gramps-addons/trunk/contrib/Django/ImportDjango.py?view=markup - Importer
* http://ancestorsnow.com/ancestors
* http://www.phpmyfamily.net/demo/
* http://www.frog.za.net/family/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 (betaalpha[http://www.innovup.com/evenement/124/89-actualites-agenda.htm])
Source oriented:

Navigation menu