New CSS theme type
svn: r19822
This commit is contained in:
parent
0d8fbf842f
commit
717e40170f
@ -1,7 +1,9 @@
|
|||||||
# Initialize GRAMPS Django site
|
# Initialize GRAMPS Django site
|
||||||
|
|
||||||
update: grampsdb/fixtures/initial_data.json
|
update: grampsdb/fixtures/initial_data.json
|
||||||
PYTHONPATH=../../src python manage.py syncdb
|
PYTHONPATH=../../src python manage.py syncdb --noinput
|
||||||
|
PYTHONPATH=../../src python manage.py createsuperuser --username=admin --email=bugs@gramps-project.org
|
||||||
|
PYTHONPATH=../../src python manage.py createsuperuser --username=admin1 --email=bugs@gramps-project.org
|
||||||
|
|
||||||
grampsdb/fixtures/initial_data.json: init.py
|
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
|
||||||
@ -13,7 +15,26 @@ run:
|
|||||||
PYTHONPATH=../../src python manage.py runserver
|
PYTHONPATH=../../src python manage.py runserver
|
||||||
|
|
||||||
sql:
|
sql:
|
||||||
PYTHONPATH=../../src python manage.py sqlall > gramps_sql.txt
|
PYTHONPATH=../../src python manage.py sqlall > gramps-sql.sql
|
||||||
|
|
||||||
|
dump:
|
||||||
|
echo ".dump" | sqlite3 sqlite.db > gramps-data.sql
|
||||||
|
|
||||||
|
load:
|
||||||
|
sqlite3 sqlite.db < gramps-data.sql
|
||||||
|
|
||||||
|
superusers:
|
||||||
|
PYTHONPATH=../../src python manage.py createsuperuser --username=admin --email=bugs@gramps-project.org
|
||||||
|
PYTHONPATH=../../src python manage.py createsuperuser --username=admin1 --email=bugs@gramps-project.org
|
||||||
|
|
||||||
|
backup:
|
||||||
|
PYTHONPATH=../../src python manage.py dumpdata > backup.json
|
||||||
|
|
||||||
|
restore: empty
|
||||||
|
PYTHONPATH=../../src python manage.py loaddata backup.json
|
||||||
|
|
||||||
|
initial_data:
|
||||||
|
PYTHONPATH=../../src python manage.py loaddata grampsdb/fixtures/initial_data.json
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
mkdir -p docs
|
mkdir -p docs
|
||||||
@ -32,6 +53,9 @@ docs:
|
|||||||
python manage.py graph_models grampsdb -i Person,Family,Source,Event,Repository,Place,Media,Note,Attribute,Datamap,Name,Lds,Tag,Address,Location,Url -o docs/prim-sec-tables.png
|
python manage.py graph_models grampsdb -i Person,Family,Source,Event,Repository,Place,Media,Note,Attribute,Datamap,Name,Lds,Tag,Address,Location,Url -o docs/prim-sec-tables.png
|
||||||
python manage.py graph_models grampsdb -i Person,Family,Source,Event,Repository,Place,Media,Note,Attribute,Datamap,Name,Lds,Tag,Address,Location,Url,NoteRef,SourceRef,EventRef,RepositoryRef,PersonRef,ChildRef,MediaRef -o docs/prim-sec-ref-tables.png
|
python manage.py graph_models grampsdb -i Person,Family,Source,Event,Repository,Place,Media,Note,Attribute,Datamap,Name,Lds,Tag,Address,Location,Url,NoteRef,SourceRef,EventRef,RepositoryRef,PersonRef,ChildRef,MediaRef -o docs/prim-sec-ref-tables.png
|
||||||
|
|
||||||
|
make-empty:
|
||||||
|
echo ".dump" | sqlite3 sqlite.db > empty.sql
|
||||||
|
|
||||||
empty:
|
empty:
|
||||||
rm -f sqlite.db
|
rm -f sqlite.db
|
||||||
sqlite3 sqlite.db < empty.sql
|
sqlite3 sqlite.db < empty.sql
|
||||||
|
|||||||
1138
src/webapp/empty.sql
1138
src/webapp/empty.sql
File diff suppressed because it is too large
Load Diff
@ -29,8 +29,7 @@ class Profile(models.Model):
|
|||||||
themes, bookmarks, etc.
|
themes, bookmarks, etc.
|
||||||
"""
|
"""
|
||||||
user = models.ForeignKey(User, unique=True)
|
user = models.ForeignKey(User, unique=True)
|
||||||
css_theme = models.CharField(max_length=40,
|
theme_type = models.ForeignKey("ThemeType", default=1) # The default is a pk?
|
||||||
default="Web_Mainz.css")
|
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return unicode(self.user)
|
return unicode(self.user)
|
||||||
|
|||||||
@ -91,7 +91,7 @@ def context_processor(request):
|
|||||||
context = {}
|
context = {}
|
||||||
if request.user.is_authenticated():
|
if request.user.is_authenticated():
|
||||||
profile = request.user.get_profile()
|
profile = request.user.get_profile()
|
||||||
context["css_theme"] = profile.css_theme
|
context["css_theme"] = profile.theme_type.name
|
||||||
else:
|
else:
|
||||||
context["css_theme"] = "Web_Mainz.css"
|
context["css_theme"] = "Web_Mainz.css"
|
||||||
# Other things for all environments:
|
# Other things for all environments:
|
||||||
|
|||||||
@ -62,7 +62,7 @@ for table, entries in [("grampsdb.config",
|
|||||||
(("setting", "\"db_version\""),
|
(("setting", "\"db_version\""),
|
||||||
("description", "\"database scheme version\""),
|
("description", "\"database scheme version\""),
|
||||||
("value_type", "\"str\""),
|
("value_type", "\"str\""),
|
||||||
("value", "\"0.6.0\"")),
|
("value", "\"0.6.1\"")),
|
||||||
(("setting", "\"db_created\""),
|
(("setting", "\"db_created\""),
|
||||||
("description", "\"database creation date/time\""),
|
("description", "\"database creation date/time\""),
|
||||||
("value_type", "\"str\""),
|
("value_type", "\"str\""),
|
||||||
@ -175,7 +175,7 @@ for table, entries in [("grampsdb.config",
|
|||||||
type_models = [NameType, NameOriginType, AttributeType, UrlType, ChildRefType,
|
type_models = [NameType, NameOriginType, AttributeType, UrlType, ChildRefType,
|
||||||
RepositoryType, EventType, FamilyRelType, SourceMediaType,
|
RepositoryType, EventType, FamilyRelType, SourceMediaType,
|
||||||
EventRoleType, NoteType, GenderType, LdsType, LdsStatus,
|
EventRoleType, NoteType, GenderType, LdsType, LdsStatus,
|
||||||
NameFormatType, StyledTextTagType]
|
NameFormatType, StyledTextTagType, ThemeType]
|
||||||
for type in type_models:
|
for type in type_models:
|
||||||
count = 1
|
count = 1
|
||||||
# Add each code:
|
# Add each code:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user