File tree Expand file tree Collapse file tree 4 files changed +25
-4
lines changed
Expand file tree Collapse file tree 4 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 11[buildout]
2+ extends = versions.cfg
23parts =
34 paulla.paste
45
56develop =
67 .
8+
9+ versions = versions
710[paulla.paste]
811recipe = zc.recipe.egg
912eggs =
1417 paulla.paste
1518 nose
1619 coverage
20+ gunicorn
1721interpreter = python
1822
23+
Original file line number Diff line number Diff 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 ()
Original file line number Diff line number Diff 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' )
Original file line number Diff line number Diff line change @@ -7,9 +7,12 @@ pyramid.debug_notfound = false
77pyramid.debug_routematch = false
88pyramid.default_locale_name = en
99
10+ couchdb.url = http://couchdb.paulla.asso.fr:5984
11+ couchdb.db = paste
12+
1013[server:main]
1114use = egg:waitress# main
12- host = 192.168.42.180
15+ host = 10.13.1.101
1316port = 6543
1417
1518# Begin logging configuration
You can’t perform that action at this time.
0 commit comments