Permalink
Browse files

because migration

  • Loading branch information...
User Paste
User Paste committed Jan 18, 2018
1 parent e3068fc commit a51ea94a725a31bacae12b1db1df82aef5bf6525
Showing with 25 additions and 4 deletions.
  1. +5 −0 buildout.cfg
  2. +12 −2 paulla/paste/__init__.py
  3. +4 −1 paulla/paste/views.py
  4. +4 −1 production.ini
@@ -1,9 +1,12 @@
[buildout]
extends = versions.cfg
parts =
paulla.paste

develop =
.

versions = versions
[paulla.paste]
recipe = zc.recipe.egg
eggs =
@@ -14,5 +17,7 @@ eggs =
paulla.paste
nose
coverage
gunicorn
interpreter = python


@@ -12,12 +12,22 @@ def main(global_config, **settings):
set_cache_regions_from_settings(settings)

config = Configurator(settings=settings)


config.include('pyramid_fanstatic')
config.include('pyramid_beaker')
config.include('rebecca.fanstatic')
# config.include('pyramid_rpc.xmlrpc')


config.set_session_factory(sessionFactory)


get_current_registry().settings = settings

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


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

config.add_route('rss2', '/feeds/rss2')

#import pdb; pdb.set_trace()
config.add_fanstatic_resources([resource.strip() for resource in settings['resources'].split(',')]
, r'.*\.pt')
, r'.*\.pt')

config.scan()
return config.make_wsgi_app()
@@ -130,7 +130,10 @@ def previous():
"""
Return the list of the 10 previous paste.
"""
previousPastes = Paste.view('paste/all', limit=10).all()
try:
previousPastes = Paste.view('paste/all', limit=10).all()
except:
previousPastes = []
return previousPastes

@cache_region('long_term', 'lexers')
@@ -7,9 +7,12 @@ pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en

couchdb.url = http://couchdb.paulla.asso.fr:5984
couchdb.db = paste

[server:main]
use = egg:waitress#main
host = 192.168.42.180
host = 10.13.1.101
port = 6543

# Begin logging configuration

0 comments on commit a51ea94

Please sign in to comment.