Added sitename to Config; updated sample DBs
svn: r19588
This commit is contained in:
parent
22bcc1858e
commit
62df43f815
@ -3,7 +3,7 @@
|
|||||||
update: grampsdb/fixtures/initial_data.json
|
update: grampsdb/fixtures/initial_data.json
|
||||||
PYTHONPATH=../../src python manage.py syncdb
|
PYTHONPATH=../../src python manage.py syncdb
|
||||||
|
|
||||||
grampsdb/fixtures/initial_data.json:
|
grampsdb/fixtures/initial_data.json: init.py
|
||||||
PYTHONPATH=../../src python init.py > grampsdb/fixtures/initial_data.json
|
PYTHONPATH=../../src python init.py > grampsdb/fixtures/initial_data.json
|
||||||
|
|
||||||
init_gramps:
|
init_gramps:
|
||||||
|
@ -219,7 +219,7 @@ CREATE TABLE "auth_user" (
|
|||||||
"last_login" datetime NOT NULL,
|
"last_login" datetime NOT NULL,
|
||||||
"date_joined" datetime NOT NULL
|
"date_joined" datetime NOT NULL
|
||||||
);
|
);
|
||||||
INSERT INTO "auth_user" VALUES(1,'dblank','','','dblank@cs.brynmawr.edu','sha1$932d5$433307572310d70ce2c50b396e4a90b48c980d0d',1,1,1,'2012-05-16 21:16:32.320892','2012-05-16 21:16:32.320892');
|
INSERT INTO "auth_user" VALUES(1,'admin','','','doug.blank@gmail.com','sha1$e702c$76d3a7dfc417b4e80faa6a032a54220d270eeda5',1,1,1,'2012-05-19 07:40:35.640321','2012-05-19 07:40:35.640321');
|
||||||
CREATE TABLE "auth_message" (
|
CREATE TABLE "auth_message" (
|
||||||
"id" integer NOT NULL PRIMARY KEY,
|
"id" integer NOT NULL PRIMARY KEY,
|
||||||
"user_id" integer NOT NULL REFERENCES "auth_user" ("id"),
|
"user_id" integer NOT NULL REFERENCES "auth_user" ("id"),
|
||||||
@ -333,20 +333,20 @@ CREATE TABLE "grampsdb_nameorigintype" (
|
|||||||
"name" varchar(40) NOT NULL,
|
"name" varchar(40) NOT NULL,
|
||||||
"val" integer NOT NULL
|
"val" integer NOT NULL
|
||||||
);
|
);
|
||||||
INSERT INTO "grampsdb_nameorigintype" VALUES(1,'Unknown',-1);
|
INSERT INTO "grampsdb_nameorigintype" VALUES(1,'',1);
|
||||||
INSERT INTO "grampsdb_nameorigintype" VALUES(2,'Custom',0);
|
INSERT INTO "grampsdb_nameorigintype" VALUES(2,'Custom',0);
|
||||||
INSERT INTO "grampsdb_nameorigintype" VALUES(3,'',1);
|
INSERT INTO "grampsdb_nameorigintype" VALUES(3,'Feudal',7);
|
||||||
INSERT INTO "grampsdb_nameorigintype" VALUES(4,'Inherited',2);
|
INSERT INTO "grampsdb_nameorigintype" VALUES(4,'Given',3);
|
||||||
INSERT INTO "grampsdb_nameorigintype" VALUES(5,'Given',3);
|
INSERT INTO "grampsdb_nameorigintype" VALUES(5,'Inherited',2);
|
||||||
INSERT INTO "grampsdb_nameorigintype" VALUES(6,'Taken',4);
|
INSERT INTO "grampsdb_nameorigintype" VALUES(6,'Location',12);
|
||||||
INSERT INTO "grampsdb_nameorigintype" VALUES(7,'Patronymic',5);
|
INSERT INTO "grampsdb_nameorigintype" VALUES(7,'Matrilineal',10);
|
||||||
INSERT INTO "grampsdb_nameorigintype" VALUES(8,'Matronymic',6);
|
INSERT INTO "grampsdb_nameorigintype" VALUES(8,'Matronymic',6);
|
||||||
INSERT INTO "grampsdb_nameorigintype" VALUES(9,'Feudal',7);
|
INSERT INTO "grampsdb_nameorigintype" VALUES(9,'Occupation',11);
|
||||||
INSERT INTO "grampsdb_nameorigintype" VALUES(10,'Pseudonym',8);
|
INSERT INTO "grampsdb_nameorigintype" VALUES(10,'Patrilineal',9);
|
||||||
INSERT INTO "grampsdb_nameorigintype" VALUES(11,'Patrilineal',9);
|
INSERT INTO "grampsdb_nameorigintype" VALUES(11,'Patronymic',5);
|
||||||
INSERT INTO "grampsdb_nameorigintype" VALUES(12,'Matrilineal',10);
|
INSERT INTO "grampsdb_nameorigintype" VALUES(12,'Pseudonym',8);
|
||||||
INSERT INTO "grampsdb_nameorigintype" VALUES(13,'Occupation',11);
|
INSERT INTO "grampsdb_nameorigintype" VALUES(13,'Taken',4);
|
||||||
INSERT INTO "grampsdb_nameorigintype" VALUES(14,'Location',12);
|
INSERT INTO "grampsdb_nameorigintype" VALUES(14,'Unknown',-1);
|
||||||
CREATE TABLE "grampsdb_attributetype" (
|
CREATE TABLE "grampsdb_attributetype" (
|
||||||
"id" integer NOT NULL PRIMARY KEY,
|
"id" integer NOT NULL PRIMARY KEY,
|
||||||
"name" varchar(40) NOT NULL,
|
"name" varchar(40) NOT NULL,
|
||||||
@ -614,8 +614,9 @@ CREATE TABLE "grampsdb_config" (
|
|||||||
"value_type" varchar(25) NOT NULL,
|
"value_type" varchar(25) NOT NULL,
|
||||||
"value" text NOT NULL
|
"value" text NOT NULL
|
||||||
);
|
);
|
||||||
INSERT INTO "grampsdb_config" VALUES(1,'db_version','database scheme version','str','0.5.1');
|
INSERT INTO "grampsdb_config" VALUES(1,'sitename','site name of family tree','str','Gramps-Connect');
|
||||||
INSERT INTO "grampsdb_config" VALUES(2,'db_created','database creation date/time','str','2012-05-16 21:15');
|
INSERT INTO "grampsdb_config" VALUES(2,'db_version','database scheme version','str','0.5.1');
|
||||||
|
INSERT INTO "grampsdb_config" VALUES(3,'db_created','database creation date/time','str','2012-05-19 07:39');
|
||||||
CREATE TABLE "grampsdb_tag" (
|
CREATE TABLE "grampsdb_tag" (
|
||||||
"id" integer NOT NULL PRIMARY KEY,
|
"id" integer NOT NULL PRIMARY KEY,
|
||||||
"handle" varchar(19) NOT NULL UNIQUE,
|
"handle" varchar(19) NOT NULL UNIQUE,
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -83,6 +83,7 @@ def context_processor(request):
|
|||||||
This function is executed before template processing.
|
This function is executed before template processing.
|
||||||
takes a request, and returns a dictionary context.
|
takes a request, and returns a dictionary context.
|
||||||
"""
|
"""
|
||||||
|
global SITENAME
|
||||||
context = {}
|
context = {}
|
||||||
if request.user.is_authenticated():
|
if request.user.is_authenticated():
|
||||||
profile = request.user.get_profile()
|
profile = request.user.get_profile()
|
||||||
@ -95,7 +96,7 @@ def context_processor(request):
|
|||||||
context["menu"] = MENU
|
context["menu"] = MENU
|
||||||
context["True"] = True
|
context["True"] = True
|
||||||
context["False"] = False
|
context["False"] = False
|
||||||
context["sitename"] = "Example Family Tree"
|
context["sitename"] = Config.objects.get(setting="sitename").value
|
||||||
context["default"] = ""
|
context["default"] = ""
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
@ -54,7 +54,11 @@ def get_datamap(x):
|
|||||||
|
|
||||||
print "["
|
print "["
|
||||||
for table, entries in [("grampsdb.config",
|
for table, entries in [("grampsdb.config",
|
||||||
[(("setting", "\"db_version\""),
|
[(("setting", "\"sitename\""),
|
||||||
|
("description", "\"site name of family tree\""),
|
||||||
|
("value_type", "\"str\""),
|
||||||
|
("value", "\"Gramps-Connect\"")),
|
||||||
|
(("setting", "\"db_version\""),
|
||||||
("description", "\"database scheme version\""),
|
("description", "\"database scheme version\""),
|
||||||
("value_type", "\"str\""),
|
("value_type", "\"str\""),
|
||||||
("value", "\"0.5.1\"")),
|
("value", "\"0.5.1\"")),
|
||||||
|
Loading…
Reference in New Issue
Block a user