Skip to content

Commit

Permalink
Merge pull request #176 from voisardf/po_v143b
Browse files Browse the repository at this point in the history
[WIP] Po v143
  • Loading branch information
voisardf authored Apr 8, 2019
2 parents 3ea267c + d4c263d commit 1f78607
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
14 changes: 7 additions & 7 deletions CONST_versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ dicttoxml==1.7.4
dogpile.cache==0.6.6
future==0.16.0
generateDS==2.29.24
GeoAlchemy2==0.5.0
GeoAlchemy2==0.6.1
geojson==2.4.0
geolink-formatter==1.3.1
httplib2==0.11.3
hupper==1.3
idna==2.6
Jinja2==2.10
jsonschema==2.6.0
jsonschema==3.0.1
JSTools==1.0
lxml==4.3.0
lxml==4.3.3
Mako==1.0.7
MarkupSafe==1.0
netifaces==0.10.7
Expand All @@ -26,19 +26,19 @@ plaster-pastedeploy==0.5
psycopg2==2.7.7
pyconizer==0.1.4
Pygments==2.2.0
pyproj==1.9.5.1
pyproj==1.9.6
pyramid==1.10.2
pyramid-debugtoolbar==4.5
pyramid-mako==1.0.2
pyramid-tm==2.2
pyreproj==1.0.0
PyYAML==4.2b4
pyreproj>=1.0.0
PyYAML==5.1
repoze.lru==0.7
requests==2.21.0
simplejson==3.16.0
six==1.11.0
sqlahelper==1.0
SQLAlchemy==1.2.17
SQLAlchemy==1.3.1
SQLAlchemy-Utils==0.33.11
transaction==2.4.0
translationstring==1.3
Expand Down
20 changes: 10 additions & 10 deletions crdppf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,29 @@ def read_app_config(settings):
settings['app_config'].update({str(result.parameter):str(result.paramvalue)})

return True
# INCLUDE THE CORE CONFIGURATION AND CREATE THE APPLICATION

# INCLUDE THE CORE CONFIGURATION AND CREATE THE APPLICATION
def includeme(config):
""" This function returns a Pyramid WSGI application.
"""

settings = config.get_settings()

yaml_config = yaml.load(open(settings.get("app.cfg")))['vars']
yaml_config = yaml.load(open(settings.get("app.cfg")), Loader=yaml.SafeLoader)['vars']
settings.update(yaml_config)

my_session_factory = SignedCookieSessionFactory(
yaml_config['authtkt_secret'],
cookie_name=yaml_config['authtkt_cookie_name'],
timeout=8200
)

config.set_session_factory(my_session_factory)

global db_config
db_config = yaml.load(open(settings.get('database.cfg')))['db_config']
db_config = yaml.load(open(settings.get('database.cfg')), Loader=yaml.SafeLoader)['db_config']

settings.update(yaml.load(open(settings.get('pdf.cfg'))))
settings.update(yaml.load(open(settings.get('pdf.cfg')), Loader=yaml.SafeLoader))

engine = engine_from_config(settings, 'sqlalchemy.')
sqlahelper.add_engine(engine)
Expand All @@ -67,11 +67,11 @@ def includeme(config):
specific_static_path = os.path.join(settings['specific_root_dir'], 'static')
settings.setdefault('mako.directories',['crdppf:templates', specific_tmp_path])
settings.setdefault('reload_templates',True)

# add the static view (for static resources)
config.add_static_view('static', 'crdppf:static',cache_max_age=3600)
config.add_static_view('proj', 'crdppfportal:static', cache_max_age=3600)

# ROUTES
config.add_route('home', '/')
config.add_route('images', '/static/images/')
Expand All @@ -93,12 +93,12 @@ def includeme(config):
config.add_route('legal_documents', 'getLegalDocuments')
config.add_route('map', 'map')
config.add_route('configpanel', 'configpanel')

config.add_route('initjs', '/init.js')
config.add_route('globalsjs', '/globals.js')

config.add_route('ogcproxy', '/ogcproxy')

# CLIENT VIEWS
config.add_view('crdppf.views.entry.Entry', route_name = 'images')
config.add_view('crdppf.views.entry.Entry', route_name='test')
Expand Down
1 change: 0 additions & 1 deletion crdppf/lib/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ def get_content(id, request):
if topicdata[str(topic.topicid)][doctype] == []:
topicdata[str(topic.topicid)][doctype] = [{
"officialtitle": "",
"title": "",
"remoteurl": ""
}]

Expand Down
3 changes: 2 additions & 1 deletion crdppf/views/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from crdppf.models import DBSession
from papyrus.protocol import Protocol
from crdppf.models import Property
from sqlalchemy.sql import text


@view_config(route_name='get_property', renderer='geojson')
Expand All @@ -18,6 +19,6 @@ def get_property(request):

proto = Protocol(DBSession, Property, 'geom')

filter = "id IN ('" + id_ + "')"
filter = text("id IN ('" + id_ + "')")

return proto.read(request, filter=filter)
Binary file modified print/print-servlet.war
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name='crdppf',
version='2.7.0',
version='2.8.0',
description='sitn, a crdppf project',
author='sitn',
author_email='[email protected]',
Expand Down

0 comments on commit 1f78607

Please sign in to comment.