Changes

Jump to: navigation, search

GEPS 013: Gramps Webapp

11 bytes added, 02:34, 8 July 2015
no edit summary
</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 ====

Navigation menu