Skip to content

Commit a51ea94

Browse files
author
User Paste
committed
because migration
1 parent e3068fc commit a51ea94

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
lines changed

buildout.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
[buildout]
2+
extends = versions.cfg
23
parts =
34
paulla.paste
45

56
develop =
67
.
8+
9+
versions = versions
710
[paulla.paste]
811
recipe = zc.recipe.egg
912
eggs =
@@ -14,5 +17,7 @@ eggs =
1417
paulla.paste
1518
nose
1619
coverage
20+
gunicorn
1721
interpreter = python
1822

23+

paulla/paste/__init__.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,22 @@ def main(global_config, **settings):
1212
set_cache_regions_from_settings(settings)
1313

1414
config = Configurator(settings=settings)
15+
16+
17+
config.include('pyramid_fanstatic')
18+
config.include('pyramid_beaker')
19+
config.include('rebecca.fanstatic')
20+
# config.include('pyramid_rpc.xmlrpc')
21+
22+
1523
config.set_session_factory(sessionFactory)
1624

25+
1726
get_current_registry().settings = settings
1827

1928
config.add_static_view('static', 'static', cache_max_age=3600)
2029

30+
2131
config.add_route('home', '/')
2232
config.add_route('addContent', '/add')
2333
config.add_route('oneContent', '/{idContent}')
@@ -28,9 +38,9 @@ def main(global_config, **settings):
2838
config.add_route('delete', '/{idContent}/delete')
2939

3040
config.add_route('rss2', '/feeds/rss2')
31-
41+
#import pdb; pdb.set_trace()
3242
config.add_fanstatic_resources([resource.strip() for resource in settings['resources'].split(',')]
33-
, r'.*\.pt')
43+
, r'.*\.pt')
3444

3545
config.scan()
3646
return config.make_wsgi_app()

paulla/paste/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ def previous():
130130
"""
131131
Return the list of the 10 previous paste.
132132
"""
133-
previousPastes = Paste.view('paste/all', limit=10).all()
133+
try:
134+
previousPastes = Paste.view('paste/all', limit=10).all()
135+
except:
136+
previousPastes = []
134137
return previousPastes
135138

136139
@cache_region('long_term', 'lexers')

production.ini

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ pyramid.debug_notfound = false
77
pyramid.debug_routematch = false
88
pyramid.default_locale_name = en
99

10+
couchdb.url = http://couchdb.paulla.asso.fr:5984
11+
couchdb.db = paste
12+
1013
[server:main]
1114
use = egg:waitress#main
12-
host = 192.168.42.180
15+
host = 10.13.1.101
1316
port = 6543
1417

1518
# Begin logging configuration

0 commit comments

Comments
 (0)