Added gramps. to webapp imports (should make webapp a package)
svn: r23375
This commit is contained in:
parent
46ceab3ca8
commit
b91927e37c
@ -1,6 +1,6 @@
|
|||||||
# Initialize GRAMPS Django site
|
# Initialize GRAMPS Django site
|
||||||
|
|
||||||
PYTHON=GRAMPS_RESOURCES=../.. PYTHONPATH=../.. python
|
PYTHON=GRAMPS_RESOURCES=../.. PYTHONPATH=../.. python2.7
|
||||||
|
|
||||||
update: grampsdb/fixtures/initial_data.json
|
update: grampsdb/fixtures/initial_data.json
|
||||||
$(PYTHON) manage.py syncdb --noinput
|
$(PYTHON) manage.py syncdb --noinput
|
||||||
|
@ -26,9 +26,9 @@ import re
|
|||||||
from django import template
|
from django import template
|
||||||
from django.template import Library
|
from django.template import Library
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
from webapp.utils import *
|
from gramps.webapp.utils import *
|
||||||
from webapp.grampsdb.views import VIEWS
|
from gramps.webapp.grampsdb.views import VIEWS
|
||||||
import webapp.utils
|
import gramps.webapp.utils
|
||||||
|
|
||||||
#escape = lambda text: text
|
#escape = lambda text: text
|
||||||
|
|
||||||
@ -79,12 +79,12 @@ def make_tag(func):
|
|||||||
return do_func
|
return do_func
|
||||||
|
|
||||||
for filter_name in util_filters:
|
for filter_name in util_filters:
|
||||||
func = getattr(webapp.utils, filter_name)
|
func = getattr(gramps.webapp.utils, filter_name)
|
||||||
func.is_safe = True
|
func.is_safe = True
|
||||||
register.filter(filter_name, func)
|
register.filter(filter_name, func)
|
||||||
|
|
||||||
for tag_name in util_tags:
|
for tag_name in util_tags:
|
||||||
func = getattr(webapp.utils, tag_name)
|
func = getattr(gramps.webapp.utils, tag_name)
|
||||||
register.tag(tag_name, make_tag(func))
|
register.tag(tag_name, make_tag(func))
|
||||||
|
|
||||||
probably_alive.is_safe = True
|
probably_alive.is_safe = True
|
||||||
@ -182,7 +182,7 @@ format.is_safe = True
|
|||||||
register.simple_tag(format)
|
register.simple_tag(format)
|
||||||
|
|
||||||
def make_args(search, page):
|
def make_args(search, page):
|
||||||
return webapp.utils.build_args(search=search, page=page)
|
return gramps.webapp.utils.build_args(search=search, page=page)
|
||||||
make_args.is_safe = True
|
make_args.is_safe = True
|
||||||
register.simple_tag(make_args)
|
register.simple_tag(make_args)
|
||||||
|
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
""" Views for Person, Name, and Surname """
|
""" Views for Person, Name, and Surname """
|
||||||
|
|
||||||
## Gramps Modules
|
## Gramps Modules
|
||||||
from webapp.utils import _, boolean, update_last_changed, build_search
|
from gramps.webapp.utils import _, boolean, update_last_changed, build_search
|
||||||
from webapp.grampsdb.models import Citation
|
from gramps.webapp.grampsdb.models import Citation
|
||||||
from webapp.grampsdb.forms import *
|
from gramps.webapp.grampsdb.forms import *
|
||||||
from webapp.libdjango import DjangoInterface
|
from gramps.webapp.libdjango import DjangoInterface
|
||||||
|
|
||||||
## Django Modules
|
## Django Modules
|
||||||
from django.shortcuts import get_object_or_404, render_to_response, redirect
|
from django.shortcuts import get_object_or_404, render_to_response, redirect
|
||||||
|
@ -24,11 +24,11 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
## Gramps Modules
|
## Gramps Modules
|
||||||
from webapp.utils import _, boolean, update_last_changed, build_search
|
from gramps.webapp.utils import _, boolean, update_last_changed, build_search
|
||||||
from webapp.grampsdb.models import Event, EventType, EventRef, EventRoleType, Person
|
from gramps.webapp.grampsdb.models import Event, EventType, EventRef, EventRoleType, Person
|
||||||
from webapp.grampsdb.forms import *
|
from gramps.webapp.grampsdb.forms import *
|
||||||
from webapp.libdjango import DjangoInterface, lookup_role_index
|
from gramps.webapp.libdjango import DjangoInterface, lookup_role_index
|
||||||
from webapp.dbdjango import DbDjango
|
from gramps.webapp.dbdjango import DbDjango
|
||||||
from gramps.gen.datehandler import displayer, parser
|
from gramps.gen.datehandler import displayer, parser
|
||||||
|
|
||||||
## Django Modules
|
## Django Modules
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
""" Views for Person, Name, and Surname """
|
""" Views for Person, Name, and Surname """
|
||||||
|
|
||||||
## Gramps Modules
|
## Gramps Modules
|
||||||
from webapp.utils import _, boolean, update_last_changed, build_search
|
from gramps.webapp.utils import _, boolean, update_last_changed, build_search
|
||||||
from webapp.grampsdb.models import Family
|
from gramps.webapp.grampsdb.models import Family
|
||||||
from webapp.grampsdb.forms import *
|
from gramps.webapp.grampsdb.forms import *
|
||||||
from webapp.libdjango import DjangoInterface
|
from gramps.webapp.libdjango import DjangoInterface
|
||||||
from gramps.gen.utils.id import create_id
|
from gramps.gen.utils.id import create_id
|
||||||
|
|
||||||
## Django Modules
|
## Django Modules
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
""" Views for Person, Name, and Surname """
|
""" Views for Person, Name, and Surname """
|
||||||
|
|
||||||
## Gramps Modules
|
## Gramps Modules
|
||||||
from webapp.utils import _, boolean, update_last_changed, build_search
|
from gramps.webapp.utils import _, boolean, update_last_changed, build_search
|
||||||
from webapp.grampsdb.models import Media
|
from gramps.webapp.grampsdb.models import Media
|
||||||
from webapp.grampsdb.forms import *
|
from gramps.webapp.grampsdb.forms import *
|
||||||
from webapp.libdjango import DjangoInterface
|
from gramps.webapp.libdjango import DjangoInterface
|
||||||
from gramps.gen.config import config
|
from gramps.gen.config import config
|
||||||
|
|
||||||
## Django Modules
|
## Django Modules
|
||||||
|
@ -22,11 +22,11 @@
|
|||||||
""" Views for Person, Name, and Surname """
|
""" Views for Person, Name, and Surname """
|
||||||
|
|
||||||
## Gramps Modules
|
## Gramps Modules
|
||||||
from webapp.utils import _, boolean, update_last_changed, StyledNoteFormatter, parse_styled_text, build_search
|
from gramps.webapp.utils import _, boolean, update_last_changed, StyledNoteFormatter, parse_styled_text, build_search
|
||||||
from webapp.grampsdb.models import Note
|
from gramps.webapp.grampsdb.models import Note
|
||||||
from webapp.grampsdb.forms import *
|
from gramps.webapp.grampsdb.forms import *
|
||||||
from webapp.libdjango import DjangoInterface
|
from gramps.webapp.libdjango import DjangoInterface
|
||||||
from webapp.dbdjango import DbDjango
|
from gramps.webapp.dbdjango import DbDjango
|
||||||
|
|
||||||
## Django Modules
|
## Django Modules
|
||||||
from django.shortcuts import get_object_or_404, render_to_response, redirect
|
from django.shortcuts import get_object_or_404, render_to_response, redirect
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
""" Views for Person, Name, and Surname """
|
""" Views for Person, Name, and Surname """
|
||||||
|
|
||||||
## Gramps Modules
|
## Gramps Modules
|
||||||
from webapp.utils import _, boolean, update_last_changed, build_search, make_log
|
from gramps.webapp.utils import _, boolean, update_last_changed, build_search, make_log
|
||||||
from webapp.grampsdb.models import Person, Name, Surname
|
from gramps.webapp.grampsdb.models import Person, Name, Surname
|
||||||
from webapp.grampsdb.forms import *
|
from gramps.webapp.grampsdb.forms import *
|
||||||
from webapp.libdjango import DjangoInterface
|
from gramps.webapp.libdjango import DjangoInterface
|
||||||
|
|
||||||
## Django Modules
|
## Django Modules
|
||||||
from django.http import Http404
|
from django.http import Http404
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
""" Views for Person, Name, and Surname """
|
""" Views for Person, Name, and Surname """
|
||||||
|
|
||||||
## Gramps Modules
|
## Gramps Modules
|
||||||
from webapp.utils import _, boolean, update_last_changed
|
from gramps.webapp.utils import _, boolean, update_last_changed
|
||||||
from webapp.grampsdb.models import Place
|
from gramps.webapp.grampsdb.models import Place
|
||||||
from webapp.grampsdb.forms import *
|
from gramps.webapp.grampsdb.forms import *
|
||||||
from webapp.libdjango import DjangoInterface
|
from gramps.webapp.libdjango import DjangoInterface
|
||||||
|
|
||||||
## Django Modules
|
## Django Modules
|
||||||
from django.shortcuts import get_object_or_404, render_to_response, redirect
|
from django.shortcuts import get_object_or_404, render_to_response, redirect
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
""" Views for Person, Name, and Surname """
|
""" Views for Person, Name, and Surname """
|
||||||
|
|
||||||
## Gramps Modules
|
## Gramps Modules
|
||||||
from webapp.utils import _, boolean, update_last_changed, build_search
|
from gramps.webapp.utils import _, boolean, update_last_changed, build_search
|
||||||
from webapp.grampsdb.models import Repository
|
from gramps.webapp.grampsdb.models import Repository
|
||||||
from webapp.grampsdb.forms import *
|
from gramps.webapp.grampsdb.forms import *
|
||||||
from webapp.libdjango import DjangoInterface
|
from gramps.webapp.libdjango import DjangoInterface
|
||||||
|
|
||||||
## Django Modules
|
## Django Modules
|
||||||
from django.shortcuts import get_object_or_404, render_to_response, redirect
|
from django.shortcuts import get_object_or_404, render_to_response, redirect
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
""" Views for Person, Name, and Surname """
|
""" Views for Person, Name, and Surname """
|
||||||
|
|
||||||
## Gramps Modules
|
## Gramps Modules
|
||||||
from webapp.utils import _, boolean, update_last_changed, build_search
|
from gramps.webapp.utils import _, boolean, update_last_changed, build_search
|
||||||
from webapp.grampsdb.models import Source
|
from gramps.webapp.grampsdb.models import Source
|
||||||
from webapp.grampsdb.forms import *
|
from gramps.webapp.grampsdb.forms import *
|
||||||
from webapp.libdjango import DjangoInterface
|
from gramps.webapp.libdjango import DjangoInterface
|
||||||
|
|
||||||
## Django Modules
|
## Django Modules
|
||||||
from django.shortcuts import get_object_or_404, render_to_response, redirect
|
from django.shortcuts import get_object_or_404, render_to_response, redirect
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
""" Views for Person, Name, and Surname """
|
""" Views for Person, Name, and Surname """
|
||||||
|
|
||||||
## Gramps Modules
|
## Gramps Modules
|
||||||
from webapp.utils import _, boolean, update_last_changed
|
from gramps.webapp.utils import _, boolean, update_last_changed
|
||||||
from webapp.grampsdb.models import Tag
|
from gramps.webapp.grampsdb.models import Tag
|
||||||
from webapp.grampsdb.forms import *
|
from gramps.webapp.grampsdb.forms import *
|
||||||
from webapp.libdjango import DjangoInterface
|
from gramps.webapp.libdjango import DjangoInterface
|
||||||
|
|
||||||
## Django Modules
|
## Django Modules
|
||||||
from django.shortcuts import get_object_or_404, render_to_response, redirect
|
from django.shortcuts import get_object_or_404, render_to_response, redirect
|
||||||
|
@ -24,7 +24,8 @@
|
|||||||
# Need to be able to import Gramps files from here.
|
# Need to be able to import Gramps files from here.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
os.environ['GRAMPS_RESOURCES'] = os.path.dirname(os.path.abspath(".."))
|
if os.environ.get('GRAMPS_RESOURCES', None) is None:
|
||||||
|
os.environ['GRAMPS_RESOURCES'] = os.path.dirname(os.path.abspath("../.."))
|
||||||
|
|
||||||
from gramps.gen.const import DATA_DIR, WEB_DIR
|
from gramps.gen.const import DATA_DIR, WEB_DIR
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user