Make webapp work in trunk, copying changes from gramps40
svn: r22930
BIN
data/images/Web_Gender_Female.png
Normal file
After Width: | Height: | Size: 457 B |
BIN
data/images/Web_Gender_Male.png
Normal file
After Width: | Height: | Size: 454 B |
BIN
data/images/Web_Mainz_Bkgd.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
data/images/Web_Mainz_Header.png
Normal file
After Width: | Height: | Size: 338 KiB |
BIN
data/images/Web_Mainz_Mid.png
Normal file
After Width: | Height: | Size: 111 KiB |
BIN
data/images/Web_Mainz_MidLight.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
data/images/blank.gif
Normal file
After Width: | Height: | Size: 43 B |
BIN
data/images/crosshairs.png
Normal file
After Width: | Height: | Size: 193 B |
BIN
data/images/favicon.ico
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
data/images/favicon2.ico
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
data/images/gramps-geo-altmap.png
Normal file
After Width: | Height: | Size: 654 B |
BIN
data/images/gramps-geo-birth.png
Normal file
After Width: | Height: | Size: 969 B |
BIN
data/images/gramps-geo-death.png
Normal file
After Width: | Height: | Size: 957 B |
BIN
data/images/gramps-geo-mainmap.png
Normal file
After Width: | Height: | Size: 678 B |
BIN
data/images/gramps-geo-marriage.png
Normal file
After Width: | Height: | Size: 951 B |
BIN
data/images/somerights20.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 620 B After Width: | Height: | Size: 620 B |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 964 B After Width: | Height: | Size: 964 B |
Before Width: | Height: | Size: 942 B After Width: | Height: | Size: 942 B |
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 260 B |
Before Width: | Height: | Size: 251 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 104 B After Width: | Height: | Size: 104 B |
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 125 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 105 B |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 90 B After Width: | Height: | Size: 90 B |
Before Width: | Height: | Size: 129 B After Width: | Height: | Size: 129 B |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
@ -1,10 +1,10 @@
|
||||
{% extends "admin/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ title }} | My New Title{% endblock %}
|
||||
{% block title %}{{ title }} | Adminstration{% endblock %}
|
||||
|
||||
{% block branding %}
|
||||
<h1 id="site-name">My new title for the Admin site!</h1>
|
||||
<h1 id="site-name">Administration</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block nav-global %}
|
||||
@ -13,9 +13,8 @@
|
||||
.ml {margin:0 10px 10px;display:block;float:left}
|
||||
</style>
|
||||
|
||||
<a href="/" clas="ml">Website home</a>
|
||||
<a href="/admin/" class="ml">Admin home</a>
|
||||
<a href="/admin/members/invoice/" class="ml">Invoices</a>
|
||||
<a href="/" clas="ml">Home</a>
|
||||
<a href="/admin/" class="ml">Administration home</a>
|
||||
<a href="/admin/auth/user/?is_active__exact=0" class="ml">New Users</a>
|
||||
<a href="/admin/auth/user/" class="ml">All Users</a>
|
||||
{% endif %}
|
||||
|
@ -25,6 +25,14 @@ from django.contrib.auth.models import User
|
||||
|
||||
from gramps.gen.constfunc import cuni
|
||||
|
||||
def save_profile(sender, instance, created, **kwargs):
|
||||
"""
|
||||
Creates the profile when the user gets created.
|
||||
"""
|
||||
if created:
|
||||
profile = Profile(user=instance)
|
||||
profile.save()
|
||||
|
||||
class Profile(models.Model):
|
||||
"""
|
||||
Used to save additional information of a user, such as
|
||||
@ -36,12 +44,4 @@ class Profile(models.Model):
|
||||
def __unicode__(self):
|
||||
return cuni(self.user)
|
||||
|
||||
def save_profile(sender, instance, created, **kwargs):
|
||||
"""
|
||||
Creates the profile when the user gets created.
|
||||
"""
|
||||
if created:
|
||||
profile = Profile(user=instance)
|
||||
profile.save()
|
||||
|
||||
post_save.connect(save_profile, sender=User)
|
||||
|
@ -23,8 +23,10 @@
|
||||
|
||||
# Need to be able to import Gramps files from here.
|
||||
|
||||
from gramps.gen.const import DATA_DIR, WEB_DIR
|
||||
import os
|
||||
os.environ['GRAMPS_RESOURCES'] = os.path.dirname(os.path.abspath(".."))
|
||||
|
||||
from gramps.gen.const import DATA_DIR, WEB_DIR
|
||||
|
||||
DEBUG = True
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
@ -26,6 +26,7 @@
|
||||
#### >>> Person.objects.all()
|
||||
|
||||
import os
|
||||
os.environ['GRAMPS_RESOURCES'] = os.path.dirname(os.path.abspath(".."))
|
||||
pystartup = os.path.expanduser("~/.pystartup")
|
||||
if os.path.exists(pystartup):
|
||||
execfile(pystartup)
|
||||
|
@ -33,7 +33,7 @@ import os
|
||||
# Django and Gramps Modules
|
||||
#
|
||||
#------------------------------------------------------------------------
|
||||
from gramps.gen.const import IMAGE_DIR, ROOT_DIR
|
||||
from gramps.gen.const import IMAGE_DIR, ROOT_DIR, DATA_DIR
|
||||
from django.conf.urls.defaults import *
|
||||
from django.contrib import admin
|
||||
|
||||
@ -49,12 +49,12 @@ urlpatterns = patterns('',
|
||||
urlpatterns += patterns('',
|
||||
# Static serves! DANGEROUS in production:
|
||||
(r'^styles/(?P<path>.*)$', 'django.views.static.serve',
|
||||
{'document_root':
|
||||
os.path.join(ROOT_DIR, "plugins", "webstuff"),
|
||||
{'document_root': DATA_DIR,
|
||||
# os.path.join(ROOT_DIR, "plugins", "webstuff"),
|
||||
'show_indexes': True},
|
||||
),
|
||||
(r'^images/(?P<path>.*)$', 'django.views.static.serve',
|
||||
{'document_root': IMAGE_DIR,
|
||||
{'document_root': IMAGE_DIR,
|
||||
'show_indexes': True},
|
||||
),
|
||||
)
|
||||
@ -94,6 +94,7 @@ urlpatterns += patterns('',
|
||||
(r'^person/(?P<handle>(\w+))/name/(?P<order>(\w+))/surname/(?P<sorder>(\w+))/(?P<act>(\w+))$',
|
||||
process_surname),
|
||||
(r'^family/(?P<handle>(\w+))/(?P<act>(\w+))/child/(?P<child>(\w+))$', process_child),
|
||||
## (r'^profile/(?P<position>(\w+)/)$', ),
|
||||
(r'^(?P<view>(\w+))/(?P<handle>(\w+))/(?P<act>(\w+))/(?P<item>(\w+))/(?P<index>(\w+))$',
|
||||
process_list_item),
|
||||
(r'^note/(?P<action>(\w+))/person/(?P<handle>(\w+))/name/(?P<order>(\w+))$',
|
||||
|