Make webapp work in trunk, copying changes from gramps40

svn: r22930
This commit is contained in:
Doug Blank 2013-08-29 12:23:58 +00:00
parent 6336e35a29
commit 0bf91f7708
59 changed files with 21 additions and 18 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

BIN
data/images/blank.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 B

BIN
data/images/crosshairs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

BIN
data/images/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
data/images/favicon2.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 969 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 957 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 620 B

After

Width:  |  Height:  |  Size: 620 B

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 964 B

After

Width:  |  Height:  |  Size: 964 B

View File

@ -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 %}

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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+))$',