Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added example kotti_velruse
  • Loading branch information
frgomes committed Oct 26, 2013
commit c2316346f19b71c700f012e6452a126c3c61b34e
4 changes: 4 additions & 0 deletions examples/kotti_velruse/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
0.1
---

- Initial version
Binary file added examples/kotti_velruse/Kotti.db
Binary file not shown.
2 changes: 2 additions & 0 deletions examples/kotti_velruse/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include *.txt *.ini *.cfg *.rst
recursive-include kotti_velruse *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml
Empty file.
206 changes: 206 additions & 0 deletions examples/kotti_velruse/development.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
###
# wsgi server configuration
###

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



[app:kotti_velruse]
use = egg:kotti_velruse

pyramid.reload_templates = true
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en

#pyramid.includes =
# pyramid_debugtoolbar

# By default, the toolbar only appears for clients from IP addresses
# '127.0.0.1' and '::1'.

# you should change this
session.secret=CHANGE-ME





### --------------------------------------------------------------------------
# [dummy] Kotti configuration
# These settings are necessary when testing plugins in isolation.
###

[filter:fanstatic]
use = egg:fanstatic#fanstatic

[pipeline:main]
pipeline = fanstatic
kotti

[app:kotti]
use = egg:kotti

pyramid.reload_templates = true
pyramid.debug_templates = true
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en

pyramid.includes = pyramid_debugtoolbar
pyramid_tm

sqlalchemy.url = sqlite:///%(here)s/Kotti.db
#mail.default_sender = yourname@yourhost

kotti.site_title = My Kotti site
kotti.secret = qwerty

kotti.configurators = kotti_tinymce.kotti_configure
kotti_velruse.kotti_configure

kotti.includes = kotti_velruse

### --------------------------------------------------------------------------




### --------------------------------------------------------------------------
# velruse configuration
#
# Module velruse.app.includeme looks for entries named "provider." in order
# to discover which providers are configured.
#
# NOTE: these configurations must be inside [app:kotti]
#
# Icons copied from:
# https://github.com/diversen/openid-selector
###

realm=http://apps.xkbm.net

endpoint = %(realm)s:6543/logged_in
store = memory
# store = redis
# store.host = localhost
# store.port = 6379
# store.db = 0
# store.key_prefix = velruse_ustore

# OpenID
# Despite a single provide.openid is declared, you can specify multiple
# URLs that should be used for connecting to multiple OpenID endpoints.
# See: login.mako for an example of how this can be done
provider.openid.realm=%(realm)s
provider.openid.store=openid.store.memstore:MemoryStore

# Google (this an alias to Google Hybrid, for backward compatibility)
#provider.google.realm=%(realm)s
#provider.google.consumer_key=CHANGE-ME
#provider.google.consumer_secret=CHANGE-ME
#provider.google.scope=CHANGE-ME

# Google Hybrid
#provider.google_hybrid.realm=%(realm)s
#provider.google_hybrid.consumer_key=CHANGE-ME
#provider.google_hybrid.consumer_secret=CHANGE-ME
#provider.google_hybrid.scope=CHANGE-ME

# Google OAuth2
provider.google_oauth2.consumer_key=CHANGE-ME
provider.google_oauth2.consumer_secret=CHANGE-ME
provider.google_oauth2.scope=CHANGE-ME

# Yahoo
provider.yahoo.realm=%(realm)s
provider.yahoo.consumer_key=CHANGE-ME
provider.yahoo.consumer_secret=CHANGE-ME

# Live
provider.live.client_id=CHANGE-ME
provider.live.client_secret=CHANGE-ME
provider.live.consumer_key=CHANGE-ME
provider.live.consumer_secret=CHANGE-ME

# Twitter
provider.twitter.consumer_key=CHANGE-ME
provider.twitter.consumer_secret=CHANGE-ME

# Facebook
provider.facebook.app_id=CHANGE-ME
provider.facebook.app_secret=CHANGE-ME
provider.facebook.consumer_key=CHANGE-ME
provider.facebook.consumer_secret=CHANGE-ME

# LinkedIn
provider.linkedin.consumer_key=CHANGE-ME
provider.linkedin.consumer_secret=CHANGE-ME

# Github
provider.github.app_id=CHANGE-ME
provider.github.app_secret=CHANGE-ME
provider.github.consumer_key=CHANGE-ME
provider.github.consumer_secret=CHANGE-ME

# BitBucket
provider.bitbucket.consumer_key=CHANGE-ME
provider.bitbucket.consumer_secret=CHANGE-ME

### --------------------------------------------------------------------------




### --------------------------------------------------------------------------
# logging configuration
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
###

[loggers]
keys = root, kotti, velruse, sqlalchemy

[handlers]
keys = console

[formatters]
keys = generic

[logger_root]
level = INFO
handlers = console

[logger_kotti]
level = DEBUG
handlers =
qualname = kotti

[logger_velruse]
level = DEBUG
handlers =
qualname = kotti_velruse

[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
# "level = INFO" logs SQL queries.
# "level = DEBUG" logs SQL queries and results.
# "level = WARN" logs neither. (Recommended for production systems.)

[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic

[formatter_generic]
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s

### --------------------------------------------------------------------------
33 changes: 33 additions & 0 deletions examples/kotti_velruse/kotti_velruse/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from pyramid.config import Configurator

import velruse.app


log = __import__('logging').getLogger(__name__)


def includeme(config):
velruse.app.includeme(config)
config.scan()


def kotti_configure(settings):
log.info('providers = {}'.format( velruse.app.find_providers(settings) ))
settings['pyramid.includes'] += ' kotti_velruse.views'


#def main(global_conf, **settings):
# """ This function returns a Pyramid WSGI application.
# """
# config = Configurator(settings=settings)
#
# config.add_static_view('static', 'static', cache_max_age=3600)
# config.add_route('home', '/')
# config.add_route('login', '/login')
# config.add_route('logged_in', '/logged_in')
#
# # wires velruse
# velruse.app.includeme(config)
#
# config.scan()
# return config.make_wsgi_app()
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions examples/kotti_velruse/kotti_velruse/static/ATTIC/ie6.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
* html img,
* html .png{position:relative;behavior:expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',sizingMethod='image')",
this.src = "static/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''),
this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "',sizingMethod='crop')",
this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
);}
#wrap{display:table;height:100%}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading