[xiph-commits] r13142 - in trunk/icebreaker: . Icebreaker Icebreaker/Icebreaker.egg-info Icebreaker/icebreaker Icebreaker/icebreaker/config Icebreaker/icebreaker/static Icebreaker/icebreaker/static/css Icebreaker/icebreaker/static/images Icebreaker/icebreaker/templates Icebreaker/icebreaker/tests

nickmudd at svn.xiph.org nickmudd at svn.xiph.org
Tue Jun 19 06:09:35 PDT 2007


Author: nickmudd
Date: 2007-06-19 06:09:35 -0700 (Tue, 19 Jun 2007)
New Revision: 13142

Added:
   trunk/icebreaker/Icebreaker/
   trunk/icebreaker/Icebreaker/Icebreaker.egg-info/
   trunk/icebreaker/Icebreaker/Icebreaker.egg-info/PKG-INFO
   trunk/icebreaker/Icebreaker/Icebreaker.egg-info/SOURCES.txt
   trunk/icebreaker/Icebreaker/Icebreaker.egg-info/dependency_links.txt
   trunk/icebreaker/Icebreaker/Icebreaker.egg-info/not-zip-safe
   trunk/icebreaker/Icebreaker/Icebreaker.egg-info/paster_plugins.txt
   trunk/icebreaker/Icebreaker/Icebreaker.egg-info/requires.txt
   trunk/icebreaker/Icebreaker/Icebreaker.egg-info/sqlobject.txt
   trunk/icebreaker/Icebreaker/Icebreaker.egg-info/top_level.txt
   trunk/icebreaker/Icebreaker/README.txt
   trunk/icebreaker/Icebreaker/dev.cfg
   trunk/icebreaker/Icebreaker/devdata.sqlite
   trunk/icebreaker/Icebreaker/icebreaker/
   trunk/icebreaker/Icebreaker/icebreaker/__init__.py
   trunk/icebreaker/Icebreaker/icebreaker/__init__.pyc
   trunk/icebreaker/Icebreaker/icebreaker/config/
   trunk/icebreaker/Icebreaker/icebreaker/config/__init__.py
   trunk/icebreaker/Icebreaker/icebreaker/config/app.cfg
   trunk/icebreaker/Icebreaker/icebreaker/config/log.cfg
   trunk/icebreaker/Icebreaker/icebreaker/controllers.py
   trunk/icebreaker/Icebreaker/icebreaker/controllers.pyc
   trunk/icebreaker/Icebreaker/icebreaker/json.py
   trunk/icebreaker/Icebreaker/icebreaker/model.py
   trunk/icebreaker/Icebreaker/icebreaker/model.pyc
   trunk/icebreaker/Icebreaker/icebreaker/release.py
   trunk/icebreaker/Icebreaker/icebreaker/sqlobject-history/
   trunk/icebreaker/Icebreaker/icebreaker/static/
   trunk/icebreaker/Icebreaker/icebreaker/static/css/
   trunk/icebreaker/Icebreaker/icebreaker/static/css/style.css
   trunk/icebreaker/Icebreaker/icebreaker/static/images/
   trunk/icebreaker/Icebreaker/icebreaker/static/images/favicon.ico
   trunk/icebreaker/Icebreaker/icebreaker/static/images/header_inner.png
   trunk/icebreaker/Icebreaker/icebreaker/static/images/info.png
   trunk/icebreaker/Icebreaker/icebreaker/static/images/ok.png
   trunk/icebreaker/Icebreaker/icebreaker/static/images/tg_under_the_hood.png
   trunk/icebreaker/Icebreaker/icebreaker/static/images/under_the_hood_blue.png
   trunk/icebreaker/Icebreaker/icebreaker/static/javascript/
   trunk/icebreaker/Icebreaker/icebreaker/templates/
   trunk/icebreaker/Icebreaker/icebreaker/templates/__init__.py
   trunk/icebreaker/Icebreaker/icebreaker/templates/__init__.pyc
   trunk/icebreaker/Icebreaker/icebreaker/templates/icebreaker.kid
   trunk/icebreaker/Icebreaker/icebreaker/templates/icebreaker.pyc
   trunk/icebreaker/Icebreaker/icebreaker/templates/login.kid
   trunk/icebreaker/Icebreaker/icebreaker/templates/master.kid
   trunk/icebreaker/Icebreaker/icebreaker/templates/master.pyc
   trunk/icebreaker/Icebreaker/icebreaker/templates/welcome.kid
   trunk/icebreaker/Icebreaker/icebreaker/templates/welcome.pyc
   trunk/icebreaker/Icebreaker/icebreaker/tests/
   trunk/icebreaker/Icebreaker/icebreaker/tests/__init__.py
   trunk/icebreaker/Icebreaker/icebreaker/tests/test_controllers.py
   trunk/icebreaker/Icebreaker/icebreaker/tests/test_model.py
   trunk/icebreaker/Icebreaker/sample-prod.cfg
   trunk/icebreaker/Icebreaker/setup.py
   trunk/icebreaker/Icebreaker/setup.pyc
   trunk/icebreaker/Icebreaker/start-icebreaker.py
   trunk/icebreaker/Icebreaker/test.cfg
Log:
Added TurboGears project files.


Added: trunk/icebreaker/Icebreaker/Icebreaker.egg-info/PKG-INFO
===================================================================
--- trunk/icebreaker/Icebreaker/Icebreaker.egg-info/PKG-INFO	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/Icebreaker.egg-info/PKG-INFO	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,15 @@
+Metadata-Version: 1.0
+Name: Icebreaker
+Version: 1.0
+Summary: UNKNOWN
+Home-page: UNKNOWN
+Author: UNKNOWN
+Author-email: UNKNOWN
+License: UNKNOWN
+Description: UNKNOWN
+Platform: UNKNOWN
+Classifier: Development Status :: 3 - Alpha
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Classifier: Framework :: TurboGears

Added: trunk/icebreaker/Icebreaker/Icebreaker.egg-info/SOURCES.txt
===================================================================
--- trunk/icebreaker/Icebreaker/Icebreaker.egg-info/SOURCES.txt	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/Icebreaker.egg-info/SOURCES.txt	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,21 @@
+README.txt
+setup.py
+start-icebreaker.py
+Icebreaker.egg-info/PKG-INFO
+Icebreaker.egg-info/SOURCES.txt
+Icebreaker.egg-info/dependency_links.txt
+Icebreaker.egg-info/not-zip-safe
+Icebreaker.egg-info/paster_plugins.txt
+Icebreaker.egg-info/requires.txt
+Icebreaker.egg-info/sqlobject.txt
+Icebreaker.egg-info/top_level.txt
+icebreaker/__init__.py
+icebreaker/controllers.py
+icebreaker/json.py
+icebreaker/model.py
+icebreaker/release.py
+icebreaker/config/__init__.py
+icebreaker/templates/__init__.py
+icebreaker/tests/__init__.py
+icebreaker/tests/test_controllers.py
+icebreaker/tests/test_model.py

Added: trunk/icebreaker/Icebreaker/Icebreaker.egg-info/dependency_links.txt
===================================================================
--- trunk/icebreaker/Icebreaker/Icebreaker.egg-info/dependency_links.txt	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/Icebreaker.egg-info/dependency_links.txt	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1 @@
+

Added: trunk/icebreaker/Icebreaker/Icebreaker.egg-info/not-zip-safe
===================================================================
--- trunk/icebreaker/Icebreaker/Icebreaker.egg-info/not-zip-safe	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/Icebreaker.egg-info/not-zip-safe	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1 @@
+

Added: trunk/icebreaker/Icebreaker/Icebreaker.egg-info/paster_plugins.txt
===================================================================
--- trunk/icebreaker/Icebreaker/Icebreaker.egg-info/paster_plugins.txt	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/Icebreaker.egg-info/paster_plugins.txt	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,2 @@
+TurboGears
+PasteScript

Added: trunk/icebreaker/Icebreaker/Icebreaker.egg-info/requires.txt
===================================================================
--- trunk/icebreaker/Icebreaker/Icebreaker.egg-info/requires.txt	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/Icebreaker.egg-info/requires.txt	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1 @@
+TurboGears >= 1.0.2.2
\ No newline at end of file

Added: trunk/icebreaker/Icebreaker/Icebreaker.egg-info/sqlobject.txt
===================================================================
--- trunk/icebreaker/Icebreaker/Icebreaker.egg-info/sqlobject.txt	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/Icebreaker.egg-info/sqlobject.txt	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,2 @@
+db_module=icebreaker.model
+history_dir=$base/icebreaker/sqlobject-history

Added: trunk/icebreaker/Icebreaker/Icebreaker.egg-info/top_level.txt
===================================================================
--- trunk/icebreaker/Icebreaker/Icebreaker.egg-info/top_level.txt	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/Icebreaker.egg-info/top_level.txt	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1 @@
+icebreaker

Added: trunk/icebreaker/Icebreaker/README.txt
===================================================================
--- trunk/icebreaker/Icebreaker/README.txt	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/README.txt	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,4 @@
+Icebreaker
+
+This is a TurboGears (http://www.turbogears.org) project. It can be
+started by running the start-icebreaker.py script.
\ No newline at end of file

Added: trunk/icebreaker/Icebreaker/dev.cfg
===================================================================
--- trunk/icebreaker/Icebreaker/dev.cfg	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/dev.cfg	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,66 @@
+[global]
+# This is where all of your settings go for your development environment
+# Settings that are the same for both development and production
+# (such as template engine, encodings, etc.) all go in 
+# icebreaker/config/app.cfg
+
+# DATABASE
+
+# pick the form for your database
+# sqlobject.dburi="postgres://username@hostname/databasename"
+# sqlobject.dburi="mysql://username:password@hostname:port/databasename"
+# sqlobject.dburi="sqlite:///file_name_and_path"
+
+# If you have sqlite, here's a simple default to get you started
+# in development
+sqlobject.dburi="sqlite://%(current_dir_uri)s/devdata.sqlite"
+
+
+# if you are using a database or table type without transactions
+# (MySQL default, for example), you should turn off transactions
+# by prepending notrans_ on the uri
+# sqlobject.dburi="notrans_mysql://username:password@hostname:port/databasename"
+
+# for Windows users, sqlite URIs look like:
+# sqlobject.dburi="sqlite:///drive_letter:/path/to/file"
+
+# SERVER
+
+# Some server parameters that you may want to tweak
+# server.socket_port=8080
+
+# Enable the debug output at the end on pages.
+# log_debug_info_filter.on = False
+
+server.environment="development"
+autoreload.package="icebreaker"
+
+# Auto-Reload after code modification
+# autoreload.on = True
+
+# Set to True if you'd like to abort execution if a controller gets an
+# unexpected parameter. False by default
+tg.strict_parameters = True
+
+# LOGGING
+# Logging configuration generally follows the style of the standard
+# Python logging module configuration. Note that when specifying
+# log format messages, you need to use *() for formatting variables.
+# Deployment independent log configuration is in icebreaker/config/log.cfg
+[logging]
+
+[[loggers]]
+[[[icebreaker]]]
+level='DEBUG'
+qualname='icebreaker'
+handlers=['debug_out']
+
+[[[allinfo]]]
+level='INFO'
+handlers=['debug_out']
+
+[[[access]]]
+level='INFO'
+qualname='turbogears.access'
+handlers=['access_out']
+propagate=0

Added: trunk/icebreaker/Icebreaker/devdata.sqlite
===================================================================
(Binary files differ)


Property changes on: trunk/icebreaker/Icebreaker/devdata.sqlite
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icebreaker/Icebreaker/icebreaker/__init__.py
===================================================================

Added: trunk/icebreaker/Icebreaker/icebreaker/__init__.pyc
===================================================================
(Binary files differ)


Property changes on: trunk/icebreaker/Icebreaker/icebreaker/__init__.pyc
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icebreaker/Icebreaker/icebreaker/config/__init__.py
===================================================================

Added: trunk/icebreaker/Icebreaker/icebreaker/config/app.cfg
===================================================================
--- trunk/icebreaker/Icebreaker/icebreaker/config/app.cfg	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/icebreaker/config/app.cfg	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,130 @@
+[global]
+# The settings in this file should not vary depending on the deployment
+# environment. dev.cfg and prod.cfg are the locations for
+# the different deployment settings. Settings in this file will
+# be overridden by settings in those other files.
+
+# The commented out values below are the defaults
+
+# VIEW
+
+# which view (template engine) to use if one is not specified in the
+# template name
+# tg.defaultview = "kid"
+
+# The following kid settings determine the settings used by the kid serializer.
+
+# One of (html|html-strict|xhtml|xhtml-strict|xml|json)
+# kid.outputformat="html"
+
+# kid.encoding="utf-8"
+
+# The sitetemplate is used for overall styling of a site that
+# includes multiple TurboGears applications
+# tg.sitetemplate="<packagename.templates.templatename>"
+
+# Allow every exposed function to be called as json,
+# tg.allow_json = False
+
+# List of Widgets to include on every page.
+# for exemple ['turbogears.mochikit']
+# tg.include_widgets = []
+
+# Set to True if the scheduler should be started
+# tg.scheduler = False
+
+# Set session or cookie
+# session_filter.on = True
+
+# VISIT TRACKING
+# Each visit to your application will be assigned a unique visit ID tracked via
+# a cookie sent to the visitor's browser.
+# --------------
+
+# Enable Visit tracking
+visit.on=True
+
+# Number of minutes a visit may be idle before it expires.
+# visit.timeout=20
+
+# The name of the cookie to transmit to the visitor's browser.
+# visit.cookie.name="tg-visit"
+
+# Domain name to specify when setting the cookie (must begin with . according to
+# RFC 2109). The default (None) should work for most cases and will default to
+# the machine to which the request was made. NOTE: localhost is NEVER a valid
+# value and will NOT WORK.
+# visit.cookie.domain=None
+
+# Specific path for the cookie
+# visit.cookie.path="/"
+
+# The name of the VisitManager plugin to use for visitor tracking.
+visit.manager="sqlobject"
+
+# Database class to use for visit tracking
+visit.soprovider.model = "icebreaker.model.Visit"
+identity.soprovider.model.visit = "icebreaker.model.VisitIdentity"
+
+# IDENTITY
+# General configuration of the TurboGears Identity management module
+# --------
+
+# Switch to turn on or off the Identity management module
+identity.on=True
+
+# [REQUIRED] URL to which CherryPy will internally redirect when an access
+# control check fails. If Identity management is turned on, a value for this
+# option must be specified.
+identity.failure_url="/login"
+
+# identity.provider='sqlobject'
+
+# The names of the fields on the login form containing the visitor's user ID
+# and password. In addition, the submit button is specified simply so its
+# existence may be stripped out prior to passing the form data to the target
+# controller.
+# identity.form.user_name="user_name"
+# identity.form.password="password"
+# identity.form.submit="login"
+
+# What sources should the identity provider consider when determining the
+# identity associated with a request? Comma separated list of identity sources.
+# Valid sources: form, visit, http_auth
+# identity.source="form,http_auth,visit"
+
+# SqlObjectIdentityProvider
+# Configuration options for the default IdentityProvider
+# -------------------------
+
+# The classes you wish to use for your Identity model. Remember to not use reserved
+# SQL keywords for class names (at least unless you specify a different table
+# name using sqlmeta).
+identity.soprovider.model.user="icebreaker.model.User"
+identity.soprovider.model.group="icebreaker.model.Group"
+identity.soprovider.model.permission="icebreaker.model.Permission"
+
+# The password encryption algorithm used when comparing passwords against what's
+# stored in the database. Valid values are 'md5' or 'sha1'. If you do not
+# specify an encryption algorithm, passwords are expected to be clear text.
+# The SqlObjectProvider *will* encrypt passwords supplied as part of your login
+# form.  If you set the password through the password property, like:
+# my_user.password = 'secret'
+# the password will be encrypted in the database, provided identity is up and 
+# running, or you have loaded the configuration specifying what encryption to
+# use (in situations where identity may not yet be running, like tests).
+
+# identity.soprovider.encryption_algorithm=None
+
+# compress the data sends to the web browser
+# [/] 
+# gzip_filter.on = True
+# gzip_filter.mime_types = ["application/x-javascript", "text/javascript", "text/html", "text/css", "text/plain"]
+
+[/static]
+static_filter.on = True
+static_filter.dir = "%(top_level_dir)s/static"
+
+[/favicon.ico]
+static_filter.on = True
+static_filter.file = "%(top_level_dir)s/static/images/favicon.ico"

Added: trunk/icebreaker/Icebreaker/icebreaker/config/log.cfg
===================================================================
--- trunk/icebreaker/Icebreaker/icebreaker/config/log.cfg	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/icebreaker/config/log.cfg	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,29 @@
+# LOGGING
+# Logging is often deployment specific, but some handlers and
+# formatters can be defined here.
+
+[logging]
+[[formatters]]
+[[[message_only]]]
+format='*(message)s'
+
+[[[full_content]]]
+format='*(asctime)s *(name)s *(levelname)s *(message)s'
+
+[[handlers]]
+[[[debug_out]]]
+class='StreamHandler'
+level='DEBUG'
+args='(sys.stdout,)'
+formatter='full_content'
+
+[[[access_out]]]
+class='StreamHandler'
+level='INFO'
+args='(sys.stdout,)'
+formatter='message_only'
+
+[[[error_out]]]
+class='StreamHandler'
+level='ERROR'
+args='(sys.stdout,)'

Added: trunk/icebreaker/Icebreaker/icebreaker/controllers.py
===================================================================
--- trunk/icebreaker/Icebreaker/icebreaker/controllers.py	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/icebreaker/controllers.py	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,52 @@
+from turbogears import controllers, expose, flash
+# from model import *
+from turbogears import identity, redirect
+from cherrypy import request, response
+# from icebreaker import json
+# import logging
+# log = logging.getLogger("icebreaker.controllers")
+
+class Root(controllers.RootController):
+    @expose(template="icebreaker.templates.welcome")
+    # @identity.require(identity.in_group("admin"))
+    def index(self):
+        import time
+        # log.debug("Happy TurboGears Controller Responding For Duty")
+        flash("Your application is now running")
+        return dict(now=time.ctime())
+
+    @expose(template="icebreaker.templates.login")
+    def login(self, forward_url=None, previous_url=None, *args, **kw):
+
+        if not identity.current.anonymous \
+            and identity.was_login_attempted() \
+            and not identity.get_identity_errors():
+            raise redirect(forward_url)
+
+        forward_url=None
+        previous_url= request.path
+
+        if identity.was_login_attempted():
+            msg=_("The credentials you supplied were not correct or "
+                   "did not grant access to this resource.")
+        elif identity.get_identity_errors():
+            msg=_("You must provide your credentials before accessing "
+                   "this resource.")
+        else:
+            msg=_("Please log in.")
+            forward_url= request.headers.get("Referer", "/")
+            
+        response.status=403
+        return dict(message=msg, previous_url=previous_url, logging_in=True,
+                    original_parameters=request.params,
+                    forward_url=forward_url)
+
+    @expose()
+    def logout(self):
+        identity.current.logout()
+        raise redirect("/")
+
+    @expose(template="icebreaker.templates.icebreaker")
+    def icebreaker(self):
+        import time
+        return dict(greeting="greetings from the controller")

Added: trunk/icebreaker/Icebreaker/icebreaker/controllers.pyc
===================================================================
(Binary files differ)


Property changes on: trunk/icebreaker/Icebreaker/icebreaker/controllers.pyc
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icebreaker/Icebreaker/icebreaker/json.py
===================================================================
--- trunk/icebreaker/Icebreaker/icebreaker/json.py	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/icebreaker/json.py	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,33 @@
+# A JSON-based API(view) for your app.
+# Most rules would look like:
+# @jsonify.when("isinstance(obj, YourClass)")
+# def jsonify_yourclass(obj):
+#     return [obj.val1, obj.val2]
+# @jsonify can convert your objects to following types:
+# lists, dicts, numbers and strings
+
+from turbojson.jsonify import jsonify
+
+from turbojson.jsonify import jsonify_sqlobject
+from icebreaker.model import User, Group, Permission
+
+ at jsonify.when('isinstance(obj, Group)')
+def jsonify_group(obj):
+    result = jsonify_sqlobject( obj )
+    result["users"] = [u.user_name for u in obj.users]
+    result["permissions"] = [p.permission_name for p in obj.permissions]
+    return result
+
+ at jsonify.when('isinstance(obj, User)')
+def jsonify_user(obj):
+    result = jsonify_sqlobject( obj )
+    del result['password']
+    result["groups"] = [g.group_name for g in obj.groups]
+    result["permissions"] = [p.permission_name for p in obj.permissions]
+    return result
+
+ at jsonify.when('isinstance(obj, Permission)')
+def jsonify_permission(obj):
+    result = jsonify_sqlobject( obj )
+    result["groups"] = [g.group_name for g in obj.groups]
+    return result

Added: trunk/icebreaker/Icebreaker/icebreaker/model.py
===================================================================
--- trunk/icebreaker/Icebreaker/icebreaker/model.py	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/icebreaker/model.py	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,129 @@
+from datetime import datetime
+from turbogears.database import PackageHub
+from sqlobject import *
+from turbogears import identity
+
+hub = PackageHub('icebreaker')
+__connection__ = hub
+
+# class YourDataClass(SQLObject):
+#     pass
+
+# identity models.
+class Visit(SQLObject):
+    """
+    A visit to your site
+    """
+    class sqlmeta:
+        table = 'visit'
+
+    visit_key = StringCol(length=40, alternateID=True,
+                          alternateMethodName='by_visit_key')
+    created = DateTimeCol(default=datetime.now)
+    expiry = DateTimeCol()
+
+    def lookup_visit(cls, visit_key):
+        try:
+            return cls.by_visit_key(visit_key)
+        except SQLObjectNotFound:
+            return None
+    lookup_visit = classmethod(lookup_visit)
+
+
+class VisitIdentity(SQLObject):
+    """
+    A Visit that is link to a User object
+    """
+    visit_key = StringCol(length=40, alternateID=True,
+                          alternateMethodName='by_visit_key')
+    user_id = IntCol()
+
+
+class Group(SQLObject):
+    """
+    An ultra-simple group definition.
+    """
+    # names like "Group", "Order" and "User" are reserved words in SQL
+    # so we set the name to something safe for SQL
+    class sqlmeta:
+        table = 'tg_group'
+
+    group_name = UnicodeCol(length=16, alternateID=True,
+                            alternateMethodName='by_group_name')
+    display_name = UnicodeCol(length=255)
+    created = DateTimeCol(default=datetime.now)
+
+    # collection of all users belonging to this group
+    users = RelatedJoin('User', intermediateTable='user_group',
+                        joinColumn='group_id', otherColumn='user_id')
+
+    # collection of all permissions for this group
+    permissions = RelatedJoin('Permission', joinColumn='group_id',
+                              intermediateTable='group_permission',
+                              otherColumn='permission_id')
+
+
+class User(SQLObject):
+    """
+    Reasonably basic User definition.
+    Probably would want additional attributes.
+    """
+    # names like "Group", "Order" and "User" are reserved words in SQL
+    # so we set the name to something safe for SQL
+    class sqlmeta:
+        table = 'tg_user'
+
+    user_name = UnicodeCol(length=16, alternateID=True,
+                           alternateMethodName='by_user_name')
+    email_address = UnicodeCol(length=255, alternateID=True,
+                               alternateMethodName='by_email_address')
+    display_name = UnicodeCol(length=255)
+    password = UnicodeCol(length=40)
+    created = DateTimeCol(default=datetime.now)
+
+    # groups this user belongs to
+    groups = RelatedJoin('Group', intermediateTable='user_group',
+                         joinColumn='user_id', otherColumn='group_id')
+
+    def _get_permissions(self):
+        perms = set()
+        for g in self.groups:
+            perms = perms | set(g.permissions)
+        return perms
+
+    def _set_password(self, cleartext_password):
+        "Runs cleartext_password through the hash algorithm before saving."
+        password_hash = identity.encrypt_password(cleartext_password)
+        self._SO_set_password(password_hash)
+
+    def set_password_raw(self, password):
+        "Saves the password as-is to the database."
+        self._SO_set_password(password)
+
+
+class Permission(SQLObject):
+    """
+    A relationship that determines what each Group can do
+    """
+    permission_name = UnicodeCol(length=16, alternateID=True,
+                                 alternateMethodName='by_permission_name')
+    description = UnicodeCol(length=255)
+
+    groups = RelatedJoin('Group',
+                         intermediateTable='group_permission',
+                         joinColumn='permission_id',
+                         otherColumn='group_id')
+class data(SQLObject):
+    album1 = StringCol()
+    artist1 = StringCol()
+    title1 = StringCol()
+    path1 = StringCol()
+    genre1 = StringCol()
+
+class playlists(SQLObject):
+    name = StringCol()
+    description = StringCol()
+    position = IntCol()
+    day = StringCol()
+    time = StringCol()
+    current = BoolCol()

Added: trunk/icebreaker/Icebreaker/icebreaker/model.pyc
===================================================================
(Binary files differ)


Property changes on: trunk/icebreaker/Icebreaker/icebreaker/model.pyc
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icebreaker/Icebreaker/icebreaker/release.py
===================================================================
--- trunk/icebreaker/Icebreaker/icebreaker/release.py	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/icebreaker/release.py	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,14 @@
+# Release information about Icebreaker
+
+version = "1.0"
+
+# description = "Your plan to rule the world"
+# long_description = "More description about your plan"
+# author = "Your Name Here"
+# email = "YourEmail at YourDomain"
+# copyright = "Vintage 2006 - a good year indeed"
+
+# if it's open source, you might want to specify these
+# url = "http://yourcool.site/"
+# download_url = "http://yourcool.site/download"
+# license = "MIT"

Added: trunk/icebreaker/Icebreaker/icebreaker/static/css/style.css
===================================================================
--- trunk/icebreaker/Icebreaker/icebreaker/static/css/style.css	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/icebreaker/static/css/style.css	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,134 @@
+/*
+ * Quick mash-up of CSS for the TG quick start page.
+ */
+
+html, body {
+  color: black;
+  background-color: #ddd;
+  font: x-small "Lucida Grande", "Lucida Sans Unicode", geneva, verdana, sans-serif;
+  margin: 0;
+  padding: 0;
+}
+
+td, th {padding:3px;border:none;}
+tr th {text-align:left;background-color:#f0f0f0;color:#333;}
+tr.odd td {background-color:#edf3fe;}
+tr.even td {background-color:#fff;}
+
+#header {
+  height: 80px;
+  width: 777px;
+  background: blue URL('../images/header_inner.png') no-repeat;
+  border-left: 1px solid #aaa;
+  border-right: 1px solid #aaa;
+  margin: 0 auto 0 auto;
+}
+
+a.link, a, a.active {
+  color: #369;
+}
+
+
+#main_content {
+  color: black;
+  font-size: 127%;
+  background-color: white;
+  width: 757px;
+  margin: 0 auto 0 auto;
+  border-left: 1px solid #aaa;
+  border-right: 1px solid #aaa;
+  padding: 10px;
+}
+
+#sidebar {
+  border: 1px solid #aaa;
+  background-color: #eee;
+  margin: 0.5em;
+  padding: 1em;
+  float: right;
+  width: 200px;
+  font-size: 88%;
+}
+
+#sidebar h2 {
+  margin-top: 0;
+}
+
+#sidebar ul {
+  margin-left: 1.5em;
+  padding-left: 0;
+}
+
+h1,h2,h3,h4,h5,h6,#getting_started_steps {
+  font-family: "Century Schoolbook L", Georgia, serif;
+  font-weight: bold;
+}
+
+h2 {
+  font-size: 150%;
+}
+
+#getting_started_steps a {
+  text-decoration: none;
+}
+
+#getting_started_steps a:hover {
+  text-decoration: underline;
+}
+
+#getting_started_steps li {
+  font-size: 80%;
+  margin-bottom: 0.5em;
+}
+
+#getting_started_steps h2 {
+  font-size: 120%;
+}
+
+#getting_started_steps p {
+  font: 100% "Lucida Grande", "Lucida Sans Unicode", geneva, verdana, sans-serif;
+}
+
+#footer {
+  border: 1px solid #aaa;
+  border-top: 0px none;
+  color: #999;
+  background-color: white;
+  padding: 10px;
+  font-size: 80%;
+  text-align: center;
+  width: 757px;
+  margin: 0 auto 1em auto;
+}
+
+.code {
+  font-family: monospace;
+}
+
+span.code {
+  font-weight: bold;
+  background: #eee;
+}
+
+#status_block {
+  margin: 0 auto 0.5em auto;
+  padding: 15px 10px 15px 55px;
+  background: #cec URL('../images/ok.png') left center no-repeat;
+  border: 1px solid #9c9;
+  width: 450px;
+  font-size: 120%;
+  font-weight: bolder;
+}
+
+.notice {
+  margin: 0.5em auto 0.5em auto;
+  padding: 15px 10px 15px 55px;
+  width: 450px;
+  background: #eef URL('../images/info.png') left center no-repeat;
+  border: 1px solid #cce;
+}
+
+.fielderror {
+    color: red;
+    font-weight: bold;
+}
\ No newline at end of file

Added: trunk/icebreaker/Icebreaker/icebreaker/static/images/favicon.ico
===================================================================
(Binary files differ)


Property changes on: trunk/icebreaker/Icebreaker/icebreaker/static/images/favicon.ico
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icebreaker/Icebreaker/icebreaker/static/images/header_inner.png
===================================================================
(Binary files differ)


Property changes on: trunk/icebreaker/Icebreaker/icebreaker/static/images/header_inner.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icebreaker/Icebreaker/icebreaker/static/images/info.png
===================================================================
(Binary files differ)


Property changes on: trunk/icebreaker/Icebreaker/icebreaker/static/images/info.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icebreaker/Icebreaker/icebreaker/static/images/ok.png
===================================================================
(Binary files differ)


Property changes on: trunk/icebreaker/Icebreaker/icebreaker/static/images/ok.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icebreaker/Icebreaker/icebreaker/static/images/tg_under_the_hood.png
===================================================================
(Binary files differ)


Property changes on: trunk/icebreaker/Icebreaker/icebreaker/static/images/tg_under_the_hood.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icebreaker/Icebreaker/icebreaker/static/images/under_the_hood_blue.png
===================================================================
(Binary files differ)


Property changes on: trunk/icebreaker/Icebreaker/icebreaker/static/images/under_the_hood_blue.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icebreaker/Icebreaker/icebreaker/templates/__init__.py
===================================================================

Added: trunk/icebreaker/Icebreaker/icebreaker/templates/__init__.pyc
===================================================================
(Binary files differ)


Property changes on: trunk/icebreaker/Icebreaker/icebreaker/templates/__init__.pyc
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icebreaker/Icebreaker/icebreaker/templates/icebreaker.kid
===================================================================
--- trunk/icebreaker/Icebreaker/icebreaker/templates/icebreaker.kid	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/icebreaker/templates/icebreaker.kid	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#">
+<head>
+  <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''" />
+  <title>Welcome to TurboGears</title>
+</head>
+<body>
+<h1>Now playing</h1>
+<span py:replace="greeting">whatever song is currently playing</span>
+<span py:replace="greeting">whatever playlist(or shuffle)</span>
+<h1>Next up</h1>
+<span py:replace="greeting">Next song in queue</span>
+<span py:replace="greeting">What playlist/shuffle</span>
+
+<p>some stuff about making lists, etc.</p>
+
+</body>
+</html>

Added: trunk/icebreaker/Icebreaker/icebreaker/templates/icebreaker.pyc
===================================================================
(Binary files differ)


Property changes on: trunk/icebreaker/Icebreaker/icebreaker/templates/icebreaker.pyc
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icebreaker/Icebreaker/icebreaker/templates/login.kid
===================================================================
--- trunk/icebreaker/Icebreaker/icebreaker/templates/login.kid	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/icebreaker/templates/login.kid	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,112 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:py="http://purl.org/kid/ns#">
+
+<head>
+    <meta content="text/html; charset=UTF-8"
+        http-equiv="content-type" py:replace="''"/>
+    <title>Login</title>
+    <style type="text/css">
+        #loginBox
+        {
+            width: 30%;
+            margin: auto;
+            margin-top: 10%;
+            padding-left: 10%;
+            padding-right: 10%;
+            padding-top: 5%;
+            padding-bottom: 5%;
+            font-family: verdana;
+            font-size: 10px;
+            background-color: #eee;
+            border: 2px solid #ccc;
+        }
+
+        #loginBox h1
+        {
+            font-size: 42px;
+            font-family: "Trebuchet MS";
+            margin: 0;
+            color: #ddd;
+        }
+
+        #loginBox p
+        {
+            position: relative;
+            top: -1.5em;
+            padding-left: 4em;
+            font-size: 12px;
+            margin: 0;
+            color: #666;
+        }
+
+        #loginBox table
+        {
+            table-layout: fixed;
+            border-spacing: 0;
+            width: 100%;
+        }
+
+        #loginBox td.label
+        {
+            width: 33%;
+            text-align: right;
+        }
+
+        #loginBox td.field
+        {
+            width: 66%;
+        }
+
+        #loginBox td.field input
+        {
+            width: 100%;
+        }
+
+        #loginBox td.buttons
+        {
+            text-align: right;
+        }
+
+    </style>
+</head>
+
+<body>
+    <div id="loginBox">
+        <h1>Login</h1>
+        <p>${message}</p>
+        <form action="${previous_url}" method="POST">
+            <table>
+                <tr>
+                    <td class="label">
+                        <label for="user_name">User Name:</label>
+                    </td>
+                    <td class="field">
+                        <input type="text" id="user_name" name="user_name"/>
+                    </td>
+                </tr>
+                <tr>
+                    <td class="label">
+                        <label for="password">Password:</label>
+                    </td>
+                    <td class="field">
+                        <input type="password" id="password" name="password"/>
+                    </td>
+                </tr>
+                <tr>
+                    <td colspan="2" class="buttons">
+                        <input type="submit" name="login" value="Login"/>
+                    </td>
+                </tr>
+            </table>
+
+            <input py:if="forward_url" type="hidden" name="forward_url"
+                value="${forward_url}"/>
+                
+            <input py:for="name,value in original_parameters.items()"
+                type="hidden" name="${name}" value="${value}"/>
+        </form>
+    </div>
+</body>
+</html>

Added: trunk/icebreaker/Icebreaker/icebreaker/templates/master.kid
===================================================================
--- trunk/icebreaker/Icebreaker/icebreaker/templates/master.kid	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/icebreaker/templates/master.kid	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?python import sitetemplate ?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#" py:extends="sitetemplate">
+
+<head py:match="item.tag=='{http://www.w3.org/1999/xhtml}head'" py:attrs="item.items()">
+    <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+    <title py:replace="''">Your title goes here</title>
+    <meta py:replace="item[:]"/>
+    <style type="text/css">
+        #pageLogin
+        {
+            font-size: 10px;
+            font-family: verdana;
+            text-align: right;
+        }
+    </style>
+    <style type="text/css" media="screen">
+ at import "${tg.url('/static/css/style.css')}";
+</style>
+</head>
+
+<body py:match="item.tag=='{http://www.w3.org/1999/xhtml}body'" py:attrs="item.items()">
+    <div py:if="tg.config('identity.on') and not defined('logging_in')" id="pageLogin">
+        <span py:if="tg.identity.anonymous">
+            <a href="${tg.url('/login')}">Login</a>
+        </span>
+        <span py:if="not tg.identity.anonymous">
+            Welcome ${tg.identity.user.display_name}.
+            <a href="${tg.url('/logout')}">Logout</a>
+        </span>
+    </div>
+    <div id="header">&nbsp;</div>
+    <div id="main_content">
+    <div id="status_block" class="flash" py:if="value_of('tg_flash', None)" py:content="tg_flash"></div>
+
+    <div py:replace="[item.text]+item[:]"/>
+
+    <!-- End of main_content -->
+    </div>
+<div id="footer"> <img src="${tg.url('/static/images/under_the_hood_blue.png')}" alt="TurboGears under the hood" />
+  <p>TurboGears is a open source front-to-back web development
+    framework written in Python</p>
+  <p>Copyright &copy; 2007 Kevin Dangoor</p>
+</div>
+</body>
+
+</html>

Added: trunk/icebreaker/Icebreaker/icebreaker/templates/master.pyc
===================================================================
(Binary files differ)


Property changes on: trunk/icebreaker/Icebreaker/icebreaker/templates/master.pyc
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icebreaker/Icebreaker/icebreaker/templates/welcome.kid
===================================================================
--- trunk/icebreaker/Icebreaker/icebreaker/templates/welcome.kid	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/icebreaker/templates/welcome.kid	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
+    py:extends="'master.kid'">
+<head>
+<meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
+<title>Welcome to TurboGears</title>
+</head>
+<body>
+
+  <div id="sidebar">
+    <h2>Learn more</h2>
+    Learn more about TurboGears and take part in its
+    development
+    <ul class="links">
+      <li><a href="http://www.turbogears.org">Official website</a></li>
+      <li><a href="http://docs.turbogears.org">Documentation</a></li>
+      <li><a href="http://trac.turbogears.org/turbogears/">Trac
+        (bugs/suggestions)</a></li>
+      <li><a href="http://groups.google.com/group/turbogears"> Mailing list</a> </li>
+    </ul>
+    <span py:replace="now">now</span>
+  </div>
+  <div id="getting_started">
+    <ol id="getting_started_steps">
+      <li class="getting_started">
+        <h3>Model</h3>
+        <p> <a href="http://docs.turbogears.org/1.0/GettingStarted/DefineDatabase">Design models</a> in the <span class="code">model.py</span>.<br/>
+          Edit <span class="code">dev.cfg</span> to <a href="http://docs.turbogears.org/1.0/GettingStarted/UseDatabase">use a different backend</a>, or start with a pre-configured SQLite database. <br/>
+          Use script <span class="code">tg-admin sql create</span> to create the database tables.</p>
+      </li>
+      <li class="getting_started">
+        <h3>View</h3>
+        <p> Edit <a href="http://docs.turbogears.org/1.0/GettingStarted/Kid">html-like templates</a> in the <span class="code">/templates</span> folder;<br/>
+        Put all <a href="http://docs.turbogears.org/1.0/StaticFiles">static contents</a> in the <span class="code">/static</span> folder. </p>
+      </li>
+      <li class="getting_started">
+        <h3>Controller</h3>
+        <p> Edit <span class="code"> controllers.py</span> and <a href="http://docs.turbogears.org/1.0/GettingStarted/CherryPy">build your
+          website structure</a> with the simplicity of Python objects. <br/>
+          TurboGears will automatically reload itself when you modify your project. </p>
+      </li>
+    </ol>
+    <div class="notice"> If you create something cool, please <a href="http://groups.google.com/group/turbogears">let people know</a>, and consider contributing something back to the <a href="http://groups.google.com/group/turbogears">community</a>.</div>
+  </div>
+  <!-- End of getting_started -->
+</body>
+</html>

Added: trunk/icebreaker/Icebreaker/icebreaker/templates/welcome.pyc
===================================================================
(Binary files differ)


Property changes on: trunk/icebreaker/Icebreaker/icebreaker/templates/welcome.pyc
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icebreaker/Icebreaker/icebreaker/tests/__init__.py
===================================================================

Added: trunk/icebreaker/Icebreaker/icebreaker/tests/test_controllers.py
===================================================================
--- trunk/icebreaker/Icebreaker/icebreaker/tests/test_controllers.py	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/icebreaker/tests/test_controllers.py	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,37 @@
+import unittest
+import turbogears
+from turbogears import testutil
+from icebreaker.controllers import Root
+import cherrypy
+
+cherrypy.root = Root()
+
+class TestPages(unittest.TestCase):
+
+    def setUp(self):
+        turbogears.startup.startTurboGears()
+
+    def tearDown(self):
+        """Tests for apps using identity need to stop CP/TG after each test to
+        stop the VisitManager thread. 
+        See http://trac.turbogears.org/turbogears/ticket/1217 for details.
+        """
+        turbogears.startup.stopTurboGears()
+
+    def test_method(self):
+        "the index method should return a string called now"
+        import types
+        result = testutil.call(cherrypy.root.index)
+        assert type(result["now"]) == types.StringType
+
+    def test_indextitle(self):
+        "The indexpage should have the right title"
+        testutil.createRequest("/")
+        response = cherrypy.response.body[0].lower() 
+        assert "<title>welcome to turbogears</title>" in response
+
+    def test_logintitle(self):
+        "login page should have the right title"
+        testutil.createRequest("/login")
+        response = cherrypy.response.body[0].lower()
+        assert "<title>login</title>" in response

Added: trunk/icebreaker/Icebreaker/icebreaker/tests/test_model.py
===================================================================
--- trunk/icebreaker/Icebreaker/icebreaker/tests/test_model.py	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/icebreaker/tests/test_model.py	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,22 @@
+# If your project uses a database, you can set up database tests
+# similar to what you see below. Be sure to set the db_uri to
+# an appropriate uri for your testing database. sqlite is a good
+# choice for testing, because you can use an in-memory database
+# which is very fast.
+
+from turbogears import testutil, database
+# from icebreaker.model import YourDataClass, User
+
+# database.set_db_uri("sqlite:///:memory:")
+
+# class TestUser(testutil.DBTest):
+#     def get_model(self):
+#         return User
+#     def test_creation(self):
+#         "Object creation should set the name"
+#         obj = User(user_name = "creosote",
+#                       email_address = "spam at python.not",
+#                       display_name = "Mr Creosote",
+#                       password = "Wafer-thin Mint")
+#         assert obj.display_name == "Mr Creosote"
+

Added: trunk/icebreaker/Icebreaker/sample-prod.cfg
===================================================================
--- trunk/icebreaker/Icebreaker/sample-prod.cfg	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/sample-prod.cfg	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,84 @@
+[global]
+# This is where all of your settings go for your production environment.
+# You'll copy this file over to your production server and provide it
+# as a command-line option to your start script.
+# Settings that are the same for both development and production
+# (such as template engine, encodings, etc.) all go in 
+# icebreaker/config/app.cfg
+
+# DATABASE
+
+# pick the form for your database
+# sqlobject.dburi="postgres://username@hostname/databasename"
+# sqlobject.dburi="mysql://username:password@hostname:port/databasename"
+# sqlobject.dburi="sqlite:///file_name_and_path"
+
+# If you have sqlite, here's a simple default to get you started
+# in development
+sqlobject.dburi="sqlite://%(current_dir_uri)s/devdata.sqlite"
+
+
+# if you are using a database or table type without transactions
+# (MySQL default, for example), you should turn off transactions
+# by prepending notrans_ on the uri
+# sqlobject.dburi="notrans_mysql://username:password@hostname:port/databasename"
+
+# for Windows users, sqlite URIs look like:
+# sqlobject.dburi="sqlite:///drive_letter:/path/to/file"
+
+
+# SERVER
+
+server.environment="production"
+
+# Sets the number of threads the server uses
+# server.thread_pool = 1
+
+# if this is part of a larger site, you can set the path
+# to the TurboGears instance here
+# server.webpath=""
+
+# Set to True if you are deploying your App behind a proxy
+# e.g. Apache using mod_proxy
+# base_url_filter.on = False
+
+# Set to True if your proxy adds the x_forwarded_host header
+# base_url_filter.use_x_forwarded_host = True
+
+# If your proxy does not add the x_forwarded_host header, set
+# the following to the *public* host url.
+# (Note: This will be overridden by the use_x_forwarded_host option
+# if it is set to True and the proxy adds the header correctly.
+# base_url_filter.base_url = "http://www.example.com"
+
+# Set to True if you'd like to abort execution if a controller gets an
+# unexpected parameter. False by default
+# tg.strict_parameters = False
+
+# LOGGING
+# Logging configuration generally follows the style of the standard
+# Python logging module configuration. Note that when specifying
+# log format messages, you need to use *() for formatting variables.
+# Deployment independent log configuration is in icebreaker/config/log.cfg
+[logging]
+
+[[handlers]]
+
+[[[access_out]]]
+# set the filename as the first argument below
+args="('server.log',)"
+class='FileHandler'
+level='INFO'
+formatter='message_only'
+
+[[loggers]]
+[[[icebreaker]]]
+level='ERROR'
+qualname='icebreaker'
+handlers=['error_out']
+
+[[[access]]]
+level='INFO'
+qualname='turbogears.access'
+handlers=['access_out']
+propagate=0

Added: trunk/icebreaker/Icebreaker/setup.py
===================================================================
--- trunk/icebreaker/Icebreaker/setup.py	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/setup.py	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,62 @@
+from setuptools import setup, find_packages
+from turbogears.finddata import find_package_data
+
+import os
+execfile(os.path.join("icebreaker", "release.py"))
+
+setup(
+    name="Icebreaker",
+    version=version,
+    
+    # uncomment the following lines if you fill them out in release.py
+    #description=description,
+    #author=author,
+    #author_email=email,
+    #url=url,
+    #download_url=download_url,
+    #license=license,
+    
+    install_requires = [
+        "TurboGears >= 1.0.2.2",
+    ],
+    scripts = ["start-icebreaker.py"],
+    zip_safe=False,
+    packages=find_packages(),
+    package_data = find_package_data(where='icebreaker',
+                                     package='icebreaker'),
+    keywords = [
+        # Use keywords if you'll be adding your package to the
+        # Python Cheeseshop
+        
+        # if this has widgets, uncomment the next line
+        # 'turbogears.widgets',
+        
+        # if this has a tg-admin command, uncomment the next line
+        # 'turbogears.command',
+        
+        # if this has identity providers, uncomment the next line
+        # 'turbogears.identity.provider',
+    
+        # If this is a template plugin, uncomment the next line
+        # 'python.templating.engines',
+        
+        # If this is a full application, uncomment the next line
+        # 'turbogears.app',
+    ],
+    classifiers = [
+        'Development Status :: 3 - Alpha',
+        'Operating System :: OS Independent',
+        'Programming Language :: Python',
+        'Topic :: Software Development :: Libraries :: Python Modules',
+        'Framework :: TurboGears',
+        # if this is an application that you'll distribute through
+        # the Cheeseshop, uncomment the next line
+        # 'Framework :: TurboGears :: Applications',
+        
+        # if this is a package that includes widgets that you'll distribute
+        # through the Cheeseshop, uncomment the next line
+        # 'Framework :: TurboGears :: Widgets',
+    ],
+    test_suite = 'nose.collector',
+    )
+    

Added: trunk/icebreaker/Icebreaker/setup.pyc
===================================================================
(Binary files differ)


Property changes on: trunk/icebreaker/Icebreaker/setup.pyc
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/icebreaker/Icebreaker/start-icebreaker.py
===================================================================
--- trunk/icebreaker/Icebreaker/start-icebreaker.py	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/start-icebreaker.py	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,25 @@
+#!/usr/bin/python
+import pkg_resources
+pkg_resources.require("TurboGears")
+
+from turbogears import update_config, start_server
+import cherrypy
+cherrypy.lowercase_api = True
+from os.path import *
+import sys
+
+# first look on the command line for a desired config file,
+# if it's not on the command line, then
+# look for setup.py in this directory. If it's not there, this script is
+# probably installed
+if len(sys.argv) > 1:
+    update_config(configfile=sys.argv[1], 
+        modulename="icebreaker.config")
+elif exists(join(dirname(__file__), "setup.py")):
+    update_config(configfile="dev.cfg",modulename="icebreaker.config")
+else:
+    update_config(configfile="prod.cfg",modulename="icebreaker.config")
+
+from icebreaker.controllers import Root
+
+start_server(Root())


Property changes on: trunk/icebreaker/Icebreaker/start-icebreaker.py
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/icebreaker/Icebreaker/test.cfg
===================================================================
--- trunk/icebreaker/Icebreaker/test.cfg	                        (rev 0)
+++ trunk/icebreaker/Icebreaker/test.cfg	2007-06-19 13:09:35 UTC (rev 13142)
@@ -0,0 +1,4 @@
+# You can place test-specific configuration options here (like test db uri, etc)
+
+sqlobject.dburi = "sqlite:///:memory:"
+



More information about the commits mailing list