Author: chrisz
Date: Sat Jan 29 09:30:41 2011
New Revision: 7216
URL: http://trac.turbogears.org/changeset/7216

Log:
Some templates had eol-style set to native, most of them had no eol-style.
I have removed all of these eol-style properties to not get mixed results.

Modified:
   branches/1.0/turbogears/qstemplates/quickstart/+package+/commands.py_tmpl   
(contents, props changed)
   branches/1.1/turbogears/qstemplates/quickstart/+package+/command.py_tmpl   
(contents, props changed)
   
branches/1.1/turbogears/qstemplates/quickstart/+package+/static/css/login.css_tmpl
   (contents, props changed)
   
branches/1.1/turbogears/qstemplates/quickstart/+package+/tests/test_json.py_tmpl
   (contents, props changed)
   branches/1.5/turbogears/qstemplates/quickstart/+package+/command.py_tmpl   
(contents, props changed)
   
branches/1.5/turbogears/qstemplates/quickstart/+package+/static/css/login.css_tmpl
   (contents, props changed)
   
branches/1.5/turbogears/qstemplates/quickstart/+package+/tests/test_json.py_tmpl
   (contents, props changed)

Modified: 
branches/1.0/turbogears/qstemplates/quickstart/+package+/commands.py_tmpl
==============================================================================
--- branches/1.0/turbogears/qstemplates/quickstart/+package+/commands.py_tmpl   
Fri Jan 28 09:46:43 2011        (r7215)
+++ branches/1.0/turbogears/qstemplates/quickstart/+package+/commands.py_tmpl   
Sat Jan 29 09:30:41 2011        (r7216)
@@ -1,58 +1,58 @@
-# -*- coding: utf-8 -*-
-"""This module contains functions called from console script entry points."""
-
-import sys
-from os import getcwd
-from os.path import dirname, exists, join
-
-import pkg_resources
-pkg_resources.require("TurboGears>=$turbogearsversion")
-#if $identity == 'sqlobject'
-pkg_resources.require("$sqlobjectversion")
-#elif $identity == 'sqlalchemy'
-pkg_resources.require("$sqlalchemyversion")
-#end if
-
-import cherrypy
-import turbogears
-
-cherrypy.lowercase_api = True
-
-
-class ConfigurationError(Exception):
-    pass
-
-
-def start():
-    """Start the CherryPy application server."""
-
-    setupdir = dirname(dirname(__file__))
-    curdir = getcwd()
-
-    # 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 the current directory. If there, load configuration
-    # from a file called 'dev.cfg'. If it's not there, the project
-    # is probably installed and we'll look first for a file called
-    # 'prod.cfg' in the current directory and then for a default
-    # config file called 'default.cfg' packaged in the egg.
-    if len(sys.argv) > 1:
-        configfile = sys.argv[1]
-    elif exists(join(setupdir, "setup.py")):
-        configfile = join(setupdir, "dev.cfg")
-    elif exists(join(curdir, "prod.cfg")):
-        configfile = join(curdir, "prod.cfg")
-    else:
-        try:
-            configfile = pkg_resources.resource_filename(
-              pkg_resources.Requirement.parse("${project}"),
-                "config/default.cfg")
-        except pkg_resources.DistributionNotFound:
-            raise ConfigurationError("Could not find default configuration.")
-
-    turbogears.update_config(configfile=configfile,
-        modulename="${package}.config")
-
-    from ${package}.controllers import Root
-
-    turbogears.start_server(Root())
+# -*- coding: utf-8 -*-
+"""This module contains functions called from console script entry points."""
+
+import sys
+from os import getcwd
+from os.path import dirname, exists, join
+
+import pkg_resources
+pkg_resources.require("TurboGears>=$turbogearsversion")
+#if $identity == 'sqlobject'
+pkg_resources.require("$sqlobjectversion")
+#elif $identity == 'sqlalchemy'
+pkg_resources.require("$sqlalchemyversion")
+#end if
+
+import cherrypy
+import turbogears
+
+cherrypy.lowercase_api = True
+
+
+class ConfigurationError(Exception):
+    pass
+
+
+def start():
+    """Start the CherryPy application server."""
+
+    setupdir = dirname(dirname(__file__))
+    curdir = getcwd()
+
+    # 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 the current directory. If there, load configuration
+    # from a file called 'dev.cfg'. If it's not there, the project
+    # is probably installed and we'll look first for a file called
+    # 'prod.cfg' in the current directory and then for a default
+    # config file called 'default.cfg' packaged in the egg.
+    if len(sys.argv) > 1:
+        configfile = sys.argv[1]
+    elif exists(join(setupdir, "setup.py")):
+        configfile = join(setupdir, "dev.cfg")
+    elif exists(join(curdir, "prod.cfg")):
+        configfile = join(curdir, "prod.cfg")
+    else:
+        try:
+            configfile = pkg_resources.resource_filename(
+              pkg_resources.Requirement.parse("${project}"),
+                "config/default.cfg")
+        except pkg_resources.DistributionNotFound:
+            raise ConfigurationError("Could not find default configuration.")
+
+    turbogears.update_config(configfile=configfile,
+        modulename="${package}.config")
+
+    from ${package}.controllers import Root
+
+    turbogears.start_server(Root())

Modified: 
branches/1.1/turbogears/qstemplates/quickstart/+package+/command.py_tmpl
==============================================================================
--- branches/1.1/turbogears/qstemplates/quickstart/+package+/command.py_tmpl    
Fri Jan 28 09:46:43 2011        (r7215)
+++ branches/1.1/turbogears/qstemplates/quickstart/+package+/command.py_tmpl    
Sat Jan 29 09:30:41 2011        (r7216)
@@ -1,134 +1,134 @@
-# -*- coding: utf-8 -*-
-"""This module contains functions to be called from console script entry 
points.
-"""
-
-# symbols which are imported by "from ${package}.command import *"
-__all__ = ['bootstrap', 'ConfigurationError', 'start']
-
-import sys
-import optparse
-
-from os import getcwd
-from os.path import dirname, exists, join
-
-import pkg_resources
-try:
-    pkg_resources.require("TurboGears>=$turbogearsversion")
-except pkg_resources.DistributionNotFound:
-    print """\
-This is a TurboGears (http://www.turbogears.org) application. It seems that
-you either don't have TurboGears installed or it can not be found.
-
-Please check if your PYTHONPATH is set correctly. To install TurboGears, go to
-http://docs.turbogears.org/Install and follow the instructions there. If you
-are stuck, visit http://docs.turbogears.org/GettingHelp for support options."""
-    sys.exit(1)
-#if $identity == 'sqlobject'
-try:
-    pkg_resources.require("$sqlobjectversion")
-except pkg_resources.DistributionNotFound:
-    from turbogears.util import missing_dependency_error
-    print missing_dependency_error('SQLObject')
-    sys.exit(1)
-#elif $identity == 'sqlalchemy'
-try:
-    pkg_resources.require("$sqlalchemyversion")
-except pkg_resources.DistributionNotFound:
-    from turbogears.util import missing_dependency_error
-    print missing_dependency_error('SQLAlchemy')
-    sys.exit(1)
-#end if
-
-import cherrypy
-import turbogears
-
-from ${package}.release import version
-
-
-cherrypy.lowercase_api = True
-
-
-class ConfigurationError(Exception):
-    pass
-
-
-def _read_config(args):
-    """Read deployment configuration file.
-
-    First looks on the command line for a desired config file, if it's not on
-    the command line, then looks for 'setup.py' in the parent of the directory
-    where this module is located.
-
-    If 'setup.py' is there, assumes that the application is started from
-    the project directory and should run in development mode and so loads the
-    configuration from a file called 'dev.cfg' in the current directory.
-
-    If 'setup.py' is not there, the project is probably installed and the code
-    looks first for a file called 'prod.cfg' in the current directory and, if
-    this isn't found either, for a default config file called 'default.cfg'
-    packaged in the egg.
-
-    """
-    setupdir = dirname(dirname(__file__))
-    curdir = getcwd()
-
-    if args:
-        configfile = args[0]
-    elif exists(join(setupdir, "setup.py")):
-        configfile = join(setupdir, "dev.cfg")
-    elif exists(join(curdir, "prod.cfg")):
-        configfile = join(curdir, "prod.cfg")
-    else:
-        try:
-            configfile = pkg_resources.resource_filename(
-              pkg_resources.Requirement.parse("${package}"),
-                "config/default.cfg")
-        except pkg_resources.DistributionNotFound:
-            raise ConfigurationError("Could not find default configuration.")
-
-    turbogears.update_config(configfile=configfile,
-        modulename="${package}.config")
-
-def bootstrap():
-    """Example function for loading bootstrap data into the database
-
-    You can adapt this to your needs to e.g. accept more options or to
-    run more functions for bootstrapping other parts of your application.
-    By default this runs the function '${package}.model.bootstrap_model', which
-    creates all database tables and optionally adds a user.
-
-    The following line in your project's 'setup.py' file takes care of
-    installing a command line script when you install your application via
-    easy_install which will run this function:
-
-        'bootstrap-${package} = ${package}.command:bootstrap',
-
-    """
-
-    optparser = optparse.OptionParser(usage="%prog [options] [config-file]",
-        description="Load bootstrap data into the database defined in "
-        "config-file.", version="${project} %s" % version)
-    optparser.add_option('-C', '--clean', dest="clean", action="store_true",
-        help="Purge all data in the database before loading the bootrap data.")
-#if $identity != 'none'
-    optparser.add_option('-u', '--user', dest="user", metavar="USERNAME",
-        help="Create a default user USERNAME (prompts for password).")
-#end if
-    options, args = optparser.parse_args()
-    user = getattr(options, 'user', None)
-    if user:
-        options.user = user.decode(sys.getfilesystemencoding())
-    _read_config(args)
-    from ${package}.model import bootstrap_model
-#if $identity == 'none'
-    bootstrap_model(options.clean)
-#else
-    bootstrap_model(options.clean, options.user)
-#end if
-
-def start():
-    """Start the CherryPy application server."""
-
-    _read_config(sys.argv[1:])
-    from ${package}.controllers import Root
-    turbogears.start_server(Root())
+# -*- coding: utf-8 -*-
+"""This module contains functions to be called from console script entry 
points.
+"""
+
+# symbols which are imported by "from ${package}.command import *"
+__all__ = ['bootstrap', 'ConfigurationError', 'start']
+
+import sys
+import optparse
+
+from os import getcwd
+from os.path import dirname, exists, join
+
+import pkg_resources
+try:
+    pkg_resources.require("TurboGears>=$turbogearsversion")
+except pkg_resources.DistributionNotFound:
+    print """\
+This is a TurboGears (http://www.turbogears.org) application. It seems that
+you either don't have TurboGears installed or it can not be found.
+
+Please check if your PYTHONPATH is set correctly. To install TurboGears, go to
+http://docs.turbogears.org/Install and follow the instructions there. If you
+are stuck, visit http://docs.turbogears.org/GettingHelp for support options."""
+    sys.exit(1)
+#if $identity == 'sqlobject'
+try:
+    pkg_resources.require("$sqlobjectversion")
+except pkg_resources.DistributionNotFound:
+    from turbogears.util import missing_dependency_error
+    print missing_dependency_error('SQLObject')
+    sys.exit(1)
+#elif $identity == 'sqlalchemy'
+try:
+    pkg_resources.require("$sqlalchemyversion")
+except pkg_resources.DistributionNotFound:
+    from turbogears.util import missing_dependency_error
+    print missing_dependency_error('SQLAlchemy')
+    sys.exit(1)
+#end if
+
+import cherrypy
+import turbogears
+
+from ${package}.release import version
+
+
+cherrypy.lowercase_api = True
+
+
+class ConfigurationError(Exception):
+    pass
+
+
+def _read_config(args):
+    """Read deployment configuration file.
+
+    First looks on the command line for a desired config file, if it's not on
+    the command line, then looks for 'setup.py' in the parent of the directory
+    where this module is located.
+
+    If 'setup.py' is there, assumes that the application is started from
+    the project directory and should run in development mode and so loads the
+    configuration from a file called 'dev.cfg' in the current directory.
+
+    If 'setup.py' is not there, the project is probably installed and the code
+    looks first for a file called 'prod.cfg' in the current directory and, if
+    this isn't found either, for a default config file called 'default.cfg'
+    packaged in the egg.
+
+    """
+    setupdir = dirname(dirname(__file__))
+    curdir = getcwd()
+
+    if args:
+        configfile = args[0]
+    elif exists(join(setupdir, "setup.py")):
+        configfile = join(setupdir, "dev.cfg")
+    elif exists(join(curdir, "prod.cfg")):
+        configfile = join(curdir, "prod.cfg")
+    else:
+        try:
+            configfile = pkg_resources.resource_filename(
+              pkg_resources.Requirement.parse("${package}"),
+                "config/default.cfg")
+        except pkg_resources.DistributionNotFound:
+            raise ConfigurationError("Could not find default configuration.")
+
+    turbogears.update_config(configfile=configfile,
+        modulename="${package}.config")
+
+def bootstrap():
+    """Example function for loading bootstrap data into the database
+
+    You can adapt this to your needs to e.g. accept more options or to
+    run more functions for bootstrapping other parts of your application.
+    By default this runs the function '${package}.model.bootstrap_model', which
+    creates all database tables and optionally adds a user.
+
+    The following line in your project's 'setup.py' file takes care of
+    installing a command line script when you install your application via
+    easy_install which will run this function:
+
+        'bootstrap-${package} = ${package}.command:bootstrap',
+
+    """
+
+    optparser = optparse.OptionParser(usage="%prog [options] [config-file]",
+        description="Load bootstrap data into the database defined in "
+        "config-file.", version="${project} %s" % version)
+    optparser.add_option('-C', '--clean', dest="clean", action="store_true",
+        help="Purge all data in the database before loading the bootrap data.")
+#if $identity != 'none'
+    optparser.add_option('-u', '--user', dest="user", metavar="USERNAME",
+        help="Create a default user USERNAME (prompts for password).")
+#end if
+    options, args = optparser.parse_args()
+    user = getattr(options, 'user', None)
+    if user:
+        options.user = user.decode(sys.getfilesystemencoding())
+    _read_config(args)
+    from ${package}.model import bootstrap_model
+#if $identity == 'none'
+    bootstrap_model(options.clean)
+#else
+    bootstrap_model(options.clean, options.user)
+#end if
+
+def start():
+    """Start the CherryPy application server."""
+
+    _read_config(sys.argv[1:])
+    from ${package}.controllers import Root
+    turbogears.start_server(Root())

Modified: 
branches/1.1/turbogears/qstemplates/quickstart/+package+/static/css/login.css_tmpl
==============================================================================
--- 
branches/1.1/turbogears/qstemplates/quickstart/+package+/static/css/login.css_tmpl
  Fri Jan 28 09:46:43 2011        (r7215)
+++ 
branches/1.1/turbogears/qstemplates/quickstart/+package+/static/css/login.css_tmpl
  Sat Jan 29 09:30:41 2011        (r7216)
@@ -1,93 +1,93 @@
-#if $identity == 'none'
-#raise $SkipTemplate
-#end if
-/* Login form*/
-
-#loginform {
-       text-align: center;
-       padding: 1em 2em 2em 2em;
-       overflow: auto;
-       position: relative;
-}
-
-#loginform p {
-       font-size: 12px;
-       font-weight: bold;
-       color: #555;
-}
-
-form.loginfields {
-       text-align: left;
-       width: 270px;
-       background: url('../images/loginbg.png') top left no-repeat;
-       padding: 0;
-       margin: 0 auto;
-       border: 0;
-}
-
-form.loginfields h2 {
-       font-size: 16px;
-       float: left;
-       padding: 0;
-       margin: 5px;
-       margin-top: 0;
-       background: url('../images/loginheader-left.png') top left no-repeat;
-}
-
-* html form.loginfields h2 {
-       margin-left: 3px;
-       width: 80px;
-       text-align: center;
-}
-
-form.loginfields h2 span {
-       background: url('../images/loginheader-right.png') right top no-repeat;
-       height: 30px;
-       line-height: 30px;
-       display: block;
-       font-size: 100%;
-       font-weight: normal;
-       color: #fff;
-       padding: 0 10px;
-}
-
-*+html form.loginfields h2 span {
-       padding: 0 20px;
-}
-
-form.loginfields label {
-       clear: left;
-       float: left;
-       margin-top: 5px;
-       margin-left: 10px;
-       width: 65px;
-       line-height: 31px;
-       vertical-align: middle;
-}
-
-form.loginfields input.text {
-       float: left;
-       margin-left: 10px;
-       margin-top: 5px;
-       width: 165px;
-       height: 21px;
-       padding: 5px;
-       border: 0;
-       background: url('../images/inputbg.png') top left no-repeat;
-       color: #fff;
-}
-
-form.loginfields input#submit {
-       background: url('../images/loginbottombg.png') bottom left no-repeat;
-       width: 270px;
-       height: 61px;
-       border: 0;
-       margin-top: 10px;
-       color: #fff;
-       padding: 10px 140px 20px 10px;
-}
-
-* html form.loginfields input#submit {
-       clear: both;
-       margin-left: -10px;
-}
+#if $identity == 'none'
+#raise $SkipTemplate
+#end if
+/* Login form*/
+
+#loginform {
+       text-align: center;
+       padding: 1em 2em 2em 2em;
+       overflow: auto;
+       position: relative;
+}
+
+#loginform p {
+       font-size: 12px;
+       font-weight: bold;
+       color: #555;
+}
+
+form.loginfields {
+       text-align: left;
+       width: 270px;
+       background: url('../images/loginbg.png') top left no-repeat;
+       padding: 0;
+       margin: 0 auto;
+       border: 0;
+}
+
+form.loginfields h2 {
+       font-size: 16px;
+       float: left;
+       padding: 0;
+       margin: 5px;
+       margin-top: 0;
+       background: url('../images/loginheader-left.png') top left no-repeat;
+}
+
+* html form.loginfields h2 {
+       margin-left: 3px;
+       width: 80px;
+       text-align: center;
+}
+
+form.loginfields h2 span {
+       background: url('../images/loginheader-right.png') right top no-repeat;
+       height: 30px;
+       line-height: 30px;
+       display: block;
+       font-size: 100%;
+       font-weight: normal;
+       color: #fff;
+       padding: 0 10px;
+}
+
+*+html form.loginfields h2 span {
+       padding: 0 20px;
+}
+
+form.loginfields label {
+       clear: left;
+       float: left;
+       margin-top: 5px;
+       margin-left: 10px;
+       width: 65px;
+       line-height: 31px;
+       vertical-align: middle;
+}
+
+form.loginfields input.text {
+       float: left;
+       margin-left: 10px;
+       margin-top: 5px;
+       width: 165px;
+       height: 21px;
+       padding: 5px;
+       border: 0;
+       background: url('../images/inputbg.png') top left no-repeat;
+       color: #fff;
+}
+
+form.loginfields input#submit {
+       background: url('../images/loginbottombg.png') bottom left no-repeat;
+       width: 270px;
+       height: 61px;
+       border: 0;
+       margin-top: 10px;
+       color: #fff;
+       padding: 10px 140px 20px 10px;
+}
+
+* html form.loginfields input#submit {
+       clear: both;
+       margin-left: -10px;
+}

Modified: 
branches/1.1/turbogears/qstemplates/quickstart/+package+/tests/test_json.py_tmpl
==============================================================================
--- 
branches/1.1/turbogears/qstemplates/quickstart/+package+/tests/test_json.py_tmpl
    Fri Jan 28 09:46:43 2011        (r7215)
+++ 
branches/1.1/turbogears/qstemplates/quickstart/+package+/tests/test_json.py_tmpl
    Sat Jan 29 09:30:41 2011        (r7216)
@@ -1,77 +1,77 @@
-# -*- coding: utf-8 -*-
-"""Unit test cases for testing the JSONification of data model objects."""
-
-from turbojson.jsonify import jsonify
-#if $identity != "none"
-from turbogears.database import session
-from turbogears import testutil
-
-from ${package}.model import Group, Permission, User
-import ${package}.json
-
-
-class JsonifyTest(testutil.DBTest):
-    """Unit tests for JSONification of the identity model objects."""
-
-    def setUp(self):
-        super(JsonifyTest, self).setUp()
-        #if $sqlobject == "True"
-        self.test_user = u = User(
-            user_name = u'test',
-            display_name = u'Test User',
-            email_address = u'[email protected]',
-            password = u'test')
-        self.test_group = g = Group(
-            group_name = u'test',
-            display_name = u'Test Group')
-        u.addGroup(g)
-        self.test_perm = p = Permission(
-            permission_name = u'test',
-            description = u'Test Permission')
-        p.addGroup(g)
-        #elif $sqlalchemy == "True"
-        self.test_user = u = User()
-        u.user_name = u'test'
-        u.display_name = u'Test User'
-        u.email_address = u'[email protected]'
-        u.password = u'test'
-        self.test_group = g = Group()
-        g.group_name = u'test'
-        g.display_name = u'Test Group'
-        u.groups.append(g)
-        self.test_perm = p = Permission()
-        p.permission_name = u'test'
-        p.description = u'Test Permission'
-        p.groups.append(g)
-        session.add(u)
-        session.add(g)
-        session.add(p)
-        session.flush()
-        #end if
-
-    def test_jsonify_group(self):
-        """Test that Group model objects are correctly jsonified."""
-        json = jsonify(self.test_group)
-        assert json['group_name'] == u'test'
-        assert json['display_name'] == u'Test Group'
-        assert json['users'] == [u'test']
-        assert json['permissions'] == [u'test']
-
-    def test_jsonify_permission(self):
-        """Test that Permission model objects are correctly jsonified."""
-        json = jsonify(self.test_perm)
-        assert json['permission_name'] == u'test'
-        assert json['description'] == u'Test Permission'
-        assert json['groups'] == [u'test']
-
-    def test_jsonify_user(self):
-        """Test that User model objects are correctly jsonified."""
-        json = jsonify(self.test_user)
-        assert json['user_name'] == u'test'
-        assert json['display_name'] == u'Test User'
-        assert json['email_address'] == u'[email protected]'
-        assert 'password' not in json
-        assert '_password' not in json
-        assert json['groups'] == [u'test']
-        assert json['permissions'] == [u'test']
-#end if
+# -*- coding: utf-8 -*-
+"""Unit test cases for testing the JSONification of data model objects."""
+
+from turbojson.jsonify import jsonify
+#if $identity != "none"
+from turbogears.database import session
+from turbogears import testutil
+
+from ${package}.model import Group, Permission, User
+import ${package}.json
+
+
+class JsonifyTest(testutil.DBTest):
+    """Unit tests for JSONification of the identity model objects."""
+
+    def setUp(self):
+        super(JsonifyTest, self).setUp()
+        #if $sqlobject == "True"
+        self.test_user = u = User(
+            user_name = u'test',
+            display_name = u'Test User',
+            email_address = u'[email protected]',
+            password = u'test')
+        self.test_group = g = Group(
+            group_name = u'test',
+            display_name = u'Test Group')
+        u.addGroup(g)
+        self.test_perm = p = Permission(
+            permission_name = u'test',
+            description = u'Test Permission')
+        p.addGroup(g)
+        #elif $sqlalchemy == "True"
+        self.test_user = u = User()
+        u.user_name = u'test'
+        u.display_name = u'Test User'
+        u.email_address = u'[email protected]'
+        u.password = u'test'
+        self.test_group = g = Group()
+        g.group_name = u'test'
+        g.display_name = u'Test Group'
+        u.groups.append(g)
+        self.test_perm = p = Permission()
+        p.permission_name = u'test'
+        p.description = u'Test Permission'
+        p.groups.append(g)
+        session.add(u)
+        session.add(g)
+        session.add(p)
+        session.flush()
+        #end if
+
+    def test_jsonify_group(self):
+        """Test that Group model objects are correctly jsonified."""
+        json = jsonify(self.test_group)
+        assert json['group_name'] == u'test'
+        assert json['display_name'] == u'Test Group'
+        assert json['users'] == [u'test']
+        assert json['permissions'] == [u'test']
+
+    def test_jsonify_permission(self):
+        """Test that Permission model objects are correctly jsonified."""
+        json = jsonify(self.test_perm)
+        assert json['permission_name'] == u'test'
+        assert json['description'] == u'Test Permission'
+        assert json['groups'] == [u'test']
+
+    def test_jsonify_user(self):
+        """Test that User model objects are correctly jsonified."""
+        json = jsonify(self.test_user)
+        assert json['user_name'] == u'test'
+        assert json['display_name'] == u'Test User'
+        assert json['email_address'] == u'[email protected]'
+        assert 'password' not in json
+        assert '_password' not in json
+        assert json['groups'] == [u'test']
+        assert json['permissions'] == [u'test']
+#end if

Modified: 
branches/1.5/turbogears/qstemplates/quickstart/+package+/command.py_tmpl
==============================================================================
--- branches/1.5/turbogears/qstemplates/quickstart/+package+/command.py_tmpl    
Fri Jan 28 09:46:43 2011        (r7215)
+++ branches/1.5/turbogears/qstemplates/quickstart/+package+/command.py_tmpl    
Sat Jan 29 09:30:41 2011        (r7216)
@@ -1,134 +1,134 @@
-# -*- coding: utf-8 -*-
-"""This module contains functions to be called from console script entry 
points.
-"""
-
-# symbols which are imported by "from ${package}.command import *"
-__all__ = ['bootstrap', 'ConfigurationError', 'start']
-
-import sys
-import optparse
-
-from os import getcwd
-from os.path import dirname, exists, join
-
-import pkg_resources
-try:
-    pkg_resources.require("TurboGears>=$turbogearsversion")
-except pkg_resources.DistributionNotFound:
-    print """\
-This is a TurboGears (http://www.turbogears.org) application. It seems that
-you either don't have TurboGears installed or it can not be found.
-
-Please check if your PYTHONPATH is set correctly. To install TurboGears, go to
-http://docs.turbogears.org/Install and follow the instructions there. If you
-are stuck, visit http://docs.turbogears.org/GettingHelp for support options."""
-    sys.exit(1)
-#if $identity == 'sqlobject'
-try:
-    pkg_resources.require("$sqlobjectversion")
-except pkg_resources.DistributionNotFound:
-    from turbogears.util import missing_dependency_error
-    print missing_dependency_error('SQLObject')
-    sys.exit(1)
-#elif $identity == 'sqlalchemy'
-try:
-    pkg_resources.require("$sqlalchemyversion")
-except pkg_resources.DistributionNotFound:
-    from turbogears.util import missing_dependency_error
-    print missing_dependency_error('SQLAlchemy')
-    sys.exit(1)
-#end if
-
-import cherrypy
-import turbogears
-
-from ${package}.release import version
-
-
-cherrypy.lowercase_api = True
-
-
-class ConfigurationError(Exception):
-    pass
-
-
-def _read_config(args):
-    """Read deployment configuration file.
-
-    First looks on the command line for a desired config file, if it's not on
-    the command line, then looks for 'setup.py' in the parent of the directory
-    where this module is located.
-
-    If 'setup.py' is there, assumes that the application is started from
-    the project directory and should run in development mode and so loads the
-    configuration from a file called 'dev.cfg' in the current directory.
-
-    If 'setup.py' is not there, the project is probably installed and the code
-    looks first for a file called 'prod.cfg' in the current directory and, if
-    this isn't found either, for a default config file called 'default.cfg'
-    packaged in the egg.
-
-    """
-    setupdir = dirname(dirname(__file__))
-    curdir = getcwd()
-
-    if args:
-        configfile = args[0]
-    elif exists(join(setupdir, "setup.py")):
-        configfile = join(setupdir, "dev.cfg")
-    elif exists(join(curdir, "prod.cfg")):
-        configfile = join(curdir, "prod.cfg")
-    else:
-        try:
-            configfile = pkg_resources.resource_filename(
-              pkg_resources.Requirement.parse("${package}"),
-                "config/default.cfg")
-        except pkg_resources.DistributionNotFound:
-            raise ConfigurationError("Could not find default configuration.")
-
-    turbogears.update_config(configfile=configfile,
-        modulename="${package}.config")
-
-def bootstrap():
-    """Example function for loading bootstrap data into the database
-
-    You can adapt this to your needs to e.g. accept more options or to
-    run more functions for bootstrapping other parts of your application.
-    By default this runs the function '${package}.model.bootstrap_model', which
-    creates all database tables and optionally adds a user.
-
-    The following line in your project's 'setup.py' file takes care of
-    installing a command line script when you install your application via
-    easy_install which will run this function:
-
-        'bootstrap-${package} = ${package}.command:bootstrap',
-
-    """
-
-    optparser = optparse.OptionParser(usage="%prog [options] [config-file]",
-        description="Load bootstrap data into the database defined in "
-        "config-file.", version="${project} %s" % version)
-    optparser.add_option('-C', '--clean', dest="clean", action="store_true",
-        help="Purge all data in the database before loading the bootrap data.")
-#if $identity != 'none'
-    optparser.add_option('-u', '--user', dest="user", metavar="USERNAME",
-        help="Create a default user USERNAME (prompts for password).")
-#end if
-    options, args = optparser.parse_args()
-    user = getattr(options, 'user', None)
-    if user:
-        options.user = user.decode(sys.getfilesystemencoding())
-    _read_config(args)
-    from ${package}.model import bootstrap_model
-#if $identity == 'none'
-    bootstrap_model(options.clean)
-#else
-    bootstrap_model(options.clean, options.user)
-#end if
-
-def start():
-    """Start the CherryPy application server."""
-
-    _read_config(sys.argv[1:])
-    from ${package}.controllers import Root
-    turbogears.start_server(Root())
+# -*- coding: utf-8 -*-
+"""This module contains functions to be called from console script entry 
points.
+"""
+
+# symbols which are imported by "from ${package}.command import *"
+__all__ = ['bootstrap', 'ConfigurationError', 'start']
+
+import sys
+import optparse
+
+from os import getcwd
+from os.path import dirname, exists, join
+
+import pkg_resources
+try:
+    pkg_resources.require("TurboGears>=$turbogearsversion")
+except pkg_resources.DistributionNotFound:
+    print """\
+This is a TurboGears (http://www.turbogears.org) application. It seems that
+you either don't have TurboGears installed or it can not be found.
+
+Please check if your PYTHONPATH is set correctly. To install TurboGears, go to
+http://docs.turbogears.org/Install and follow the instructions there. If you
+are stuck, visit http://docs.turbogears.org/GettingHelp for support options."""
+    sys.exit(1)
+#if $identity == 'sqlobject'
+try:
+    pkg_resources.require("$sqlobjectversion")
+except pkg_resources.DistributionNotFound:
+    from turbogears.util import missing_dependency_error
+    print missing_dependency_error('SQLObject')
+    sys.exit(1)
+#elif $identity == 'sqlalchemy'
+try:
+    pkg_resources.require("$sqlalchemyversion")
+except pkg_resources.DistributionNotFound:
+    from turbogears.util import missing_dependency_error
+    print missing_dependency_error('SQLAlchemy')
+    sys.exit(1)
+#end if
+
+import cherrypy
+import turbogears
+
+from ${package}.release import version
+
+
+cherrypy.lowercase_api = True
+
+
+class ConfigurationError(Exception):
+    pass
+
+
+def _read_config(args):
+    """Read deployment configuration file.
+
+    First looks on the command line for a desired config file, if it's not on
+    the command line, then looks for 'setup.py' in the parent of the directory
+    where this module is located.
+
+    If 'setup.py' is there, assumes that the application is started from
+    the project directory and should run in development mode and so loads the
+    configuration from a file called 'dev.cfg' in the current directory.
+
+    If 'setup.py' is not there, the project is probably installed and the code
+    looks first for a file called 'prod.cfg' in the current directory and, if
+    this isn't found either, for a default config file called 'default.cfg'
+    packaged in the egg.
+
+    """
+    setupdir = dirname(dirname(__file__))
+    curdir = getcwd()
+
+    if args:
+        configfile = args[0]
+    elif exists(join(setupdir, "setup.py")):
+        configfile = join(setupdir, "dev.cfg")
+    elif exists(join(curdir, "prod.cfg")):
+        configfile = join(curdir, "prod.cfg")
+    else:
+        try:
+            configfile = pkg_resources.resource_filename(
+              pkg_resources.Requirement.parse("${package}"),
+                "config/default.cfg")
+        except pkg_resources.DistributionNotFound:
+            raise ConfigurationError("Could not find default configuration.")
+
+    turbogears.update_config(configfile=configfile,
+        modulename="${package}.config")
+
+def bootstrap():
+    """Example function for loading bootstrap data into the database
+
+    You can adapt this to your needs to e.g. accept more options or to
+    run more functions for bootstrapping other parts of your application.
+    By default this runs the function '${package}.model.bootstrap_model', which
+    creates all database tables and optionally adds a user.
+
+    The following line in your project's 'setup.py' file takes care of
+    installing a command line script when you install your application via
+    easy_install which will run this function:
+
+        'bootstrap-${package} = ${package}.command:bootstrap',
+
+    """
+
+    optparser = optparse.OptionParser(usage="%prog [options] [config-file]",
+        description="Load bootstrap data into the database defined in "
+        "config-file.", version="${project} %s" % version)
+    optparser.add_option('-C', '--clean', dest="clean", action="store_true",
+        help="Purge all data in the database before loading the bootrap data.")
+#if $identity != 'none'
+    optparser.add_option('-u', '--user', dest="user", metavar="USERNAME",
+        help="Create a default user USERNAME (prompts for password).")
+#end if
+    options, args = optparser.parse_args()
+    user = getattr(options, 'user', None)
+    if user:
+        options.user = user.decode(sys.getfilesystemencoding())
+    _read_config(args)
+    from ${package}.model import bootstrap_model
+#if $identity == 'none'
+    bootstrap_model(options.clean)
+#else
+    bootstrap_model(options.clean, options.user)
+#end if
+
+def start():
+    """Start the CherryPy application server."""
+
+    _read_config(sys.argv[1:])
+    from ${package}.controllers import Root
+    turbogears.start_server(Root())

Modified: 
branches/1.5/turbogears/qstemplates/quickstart/+package+/static/css/login.css_tmpl
==============================================================================
--- 
branches/1.5/turbogears/qstemplates/quickstart/+package+/static/css/login.css_tmpl
  Fri Jan 28 09:46:43 2011        (r7215)
+++ 
branches/1.5/turbogears/qstemplates/quickstart/+package+/static/css/login.css_tmpl
  Sat Jan 29 09:30:41 2011        (r7216)
@@ -1,93 +1,93 @@
-#if $identity == 'none'
-#raise $SkipTemplate
-#end if
-/* Login form*/
-
-#loginform {
-       text-align: center;
-       padding: 1em 2em 2em 2em;
-       overflow: auto;
-       position: relative;
-}
-
-#loginform p {
-       font-size: 12px;
-       font-weight: bold;
-       color: #555;
-}
-
-form.loginfields {
-       text-align: left;
-       width: 270px;
-       background: url('../images/loginbg.png') top left no-repeat;
-       padding: 0;
-       margin: 0 auto;
-       border: 0;
-}
-
-form.loginfields h2 {
-       font-size: 16px;
-       float: left;
-       padding: 0;
-       margin: 5px;
-       margin-top: 0;
-       background: url('../images/loginheader-left.png') top left no-repeat;
-}
-
-* html form.loginfields h2 {
-       margin-left: 3px;
-       width: 80px;
-       text-align: center;
-}
-
-form.loginfields h2 span {
-       background: url('../images/loginheader-right.png') right top no-repeat;
-       height: 30px;
-       line-height: 30px;
-       display: block;
-       font-size: 100%;
-       font-weight: normal;
-       color: #fff;
-       padding: 0 10px;
-}
-
-*+html form.loginfields h2 span {
-       padding: 0 20px;
-}
-
-form.loginfields label {
-       clear: left;
-       float: left;
-       margin-top: 5px;
-       margin-left: 10px;
-       width: 65px;
-       line-height: 31px;
-       vertical-align: middle;
-}
-
-form.loginfields input.text {
-       float: left;
-       margin-left: 10px;
-       margin-top: 5px;
-       width: 165px;
-       height: 21px;
-       padding: 5px;
-       border: 0;
-       background: url('../images/inputbg.png') top left no-repeat;
-       color: #fff;
-}
-
-form.loginfields input#submit {
-       background: url('../images/loginbottombg.png') bottom left no-repeat;
-       width: 270px;
-       height: 61px;
-       border: 0;
-       margin-top: 10px;
-       color: #fff;
-       padding: 10px 140px 20px 10px;
-}
-
-* html form.loginfields input#submit {
-       clear: both;
-       margin-left: -10px;
-}
+#if $identity == 'none'
+#raise $SkipTemplate
+#end if
+/* Login form*/
+
+#loginform {
+       text-align: center;
+       padding: 1em 2em 2em 2em;
+       overflow: auto;
+       position: relative;
+}
+
+#loginform p {
+       font-size: 12px;
+       font-weight: bold;
+       color: #555;
+}
+
+form.loginfields {
+       text-align: left;
+       width: 270px;
+       background: url('../images/loginbg.png') top left no-repeat;
+       padding: 0;
+       margin: 0 auto;
+       border: 0;
+}
+
+form.loginfields h2 {
+       font-size: 16px;
+       float: left;
+       padding: 0;
+       margin: 5px;
+       margin-top: 0;
+       background: url('../images/loginheader-left.png') top left no-repeat;
+}
+
+* html form.loginfields h2 {
+       margin-left: 3px;
+       width: 80px;
+       text-align: center;
+}
+
+form.loginfields h2 span {
+       background: url('../images/loginheader-right.png') right top no-repeat;
+       height: 30px;
+       line-height: 30px;
+       display: block;
+       font-size: 100%;
+       font-weight: normal;
+       color: #fff;
+       padding: 0 10px;
+}
+
+*+html form.loginfields h2 span {
+       padding: 0 20px;
+}
+
+form.loginfields label {
+       clear: left;
+       float: left;
+       margin-top: 5px;
+       margin-left: 10px;
+       width: 65px;
+       line-height: 31px;
+       vertical-align: middle;
+}
+
+form.loginfields input.text {
+       float: left;
+       margin-left: 10px;
+       margin-top: 5px;
+       width: 165px;
+       height: 21px;
+       padding: 5px;
+       border: 0;
+       background: url('../images/inputbg.png') top left no-repeat;
+       color: #fff;
+}
+
+form.loginfields input#submit {
+       background: url('../images/loginbottombg.png') bottom left no-repeat;
+       width: 270px;
+       height: 61px;
+       border: 0;
+       margin-top: 10px;
+       color: #fff;
+       padding: 10px 140px 20px 10px;
+}
+
+* html form.loginfields input#submit {
+       clear: both;
+       margin-left: -10px;
+}

Modified: 
branches/1.5/turbogears/qstemplates/quickstart/+package+/tests/test_json.py_tmpl
==============================================================================
--- 
branches/1.5/turbogears/qstemplates/quickstart/+package+/tests/test_json.py_tmpl
    Fri Jan 28 09:46:43 2011        (r7215)
+++ 
branches/1.5/turbogears/qstemplates/quickstart/+package+/tests/test_json.py_tmpl
    Sat Jan 29 09:30:41 2011        (r7216)
@@ -1,76 +1,76 @@
-# -*- coding: utf-8 -*-
-"""Unit test cases for testing the JSONification of data model objects."""
-
-#if $identity != "none"
-from turbogears.database import session
-from turbogears import testutil
-
-from ${package}.model import Group, Permission, User
-from ${package}.jsonify import jsonify
-
-
-class JsonifyTest(testutil.DBTest):
-    """Unit tests for JSONification of the identity model objects."""
-
-    def setUp(self):
-        super(JsonifyTest, self).setUp()
-        #if $sqlobject == "True"
-        self.test_user = u = User(
-            user_name = u'test',
-            display_name = u'Test User',
-            email_address = u'[email protected]',
-            password = u'test')
-        self.test_group = g = Group(
-            group_name = u'test',
-            display_name = u'Test Group')
-        u.addGroup(g)
-        self.test_perm = p = Permission(
-            permission_name = u'test',
-            description = u'Test Permission')
-        p.addGroup(g)
-        #elif $sqlalchemy == "True"
-        self.test_user = u = User()
-        u.user_name = u'test'
-        u.display_name = u'Test User'
-        u.email_address = u'[email protected]'
-        u.password = u'test'
-        self.test_group = g = Group()
-        g.group_name = u'test'
-        g.display_name = u'Test Group'
-        u.groups.append(g)
-        self.test_perm = p = Permission()
-        p.permission_name = u'test'
-        p.description = u'Test Permission'
-        p.groups.append(g)
-        session.add(u)
-        session.add(g)
-        session.add(p)
-        session.flush()
-        #end if
-
-    def test_jsonify_group(self):
-        """Test that Group model objects are correctly jsonified."""
-        json = jsonify(self.test_group)
-        assert json['group_name'] == u'test'
-        assert json['display_name'] == u'Test Group'
-        assert json['users'] == [u'test']
-        assert json['permissions'] == [u'test']
-
-    def test_jsonify_permission(self):
-        """Test that Permission model objects are correctly jsonified."""
-        json = jsonify(self.test_perm)
-        assert json['permission_name'] == u'test'
-        assert json['description'] == u'Test Permission'
-        assert json['groups'] == [u'test']
-
-    def test_jsonify_user(self):
-        """Test that User model objects are correctly jsonified."""
-        json = jsonify(self.test_user)
-        assert json['user_name'] == u'test'
-        assert json['display_name'] == u'Test User'
-        assert json['email_address'] == u'[email protected]'
-        assert 'password' not in json
-        assert '_password' not in json
-        assert json['groups'] == [u'test']
-        assert json['permissions'] == [u'test']
-#end if
+# -*- coding: utf-8 -*-
+"""Unit test cases for testing the JSONification of data model objects."""
+
+#if $identity != "none"
+from turbogears.database import session
+from turbogears import testutil
+
+from ${package}.model import Group, Permission, User
+from ${package}.jsonify import jsonify
+
+
+class JsonifyTest(testutil.DBTest):
+    """Unit tests for JSONification of the identity model objects."""
+
+    def setUp(self):
+        super(JsonifyTest, self).setUp()
+        #if $sqlobject == "True"
+        self.test_user = u = User(
+            user_name = u'test',
+            display_name = u'Test User',
+            email_address = u'[email protected]',
+            password = u'test')
+        self.test_group = g = Group(
+            group_name = u'test',
+            display_name = u'Test Group')
+        u.addGroup(g)
+        self.test_perm = p = Permission(
+            permission_name = u'test',
+            description = u'Test Permission')
+        p.addGroup(g)
+        #elif $sqlalchemy == "True"
+        self.test_user = u = User()
+        u.user_name = u'test'
+        u.display_name = u'Test User'
+        u.email_address = u'[email protected]'
+        u.password = u'test'
+        self.test_group = g = Group()
+        g.group_name = u'test'
+        g.display_name = u'Test Group'
+        u.groups.append(g)
+        self.test_perm = p = Permission()
+        p.permission_name = u'test'
+        p.description = u'Test Permission'
+        p.groups.append(g)
+        session.add(u)
+        session.add(g)
+        session.add(p)
+        session.flush()
+        #end if
+
+    def test_jsonify_group(self):
+        """Test that Group model objects are correctly jsonified."""
+        json = jsonify(self.test_group)
+        assert json['group_name'] == u'test'
+        assert json['display_name'] == u'Test Group'
+        assert json['users'] == [u'test']
+        assert json['permissions'] == [u'test']
+
+    def test_jsonify_permission(self):
+        """Test that Permission model objects are correctly jsonified."""
+        json = jsonify(self.test_perm)
+        assert json['permission_name'] == u'test'
+        assert json['description'] == u'Test Permission'
+        assert json['groups'] == [u'test']
+
+    def test_jsonify_user(self):
+        """Test that User model objects are correctly jsonified."""
+        json = jsonify(self.test_user)
+        assert json['user_name'] == u'test'
+        assert json['display_name'] == u'Test User'
+        assert json['email_address'] == u'[email protected]'
+        assert 'password' not in json
+        assert '_password' not in json
+        assert json['groups'] == [u'test']
+        assert json['permissions'] == [u'test']
+#end if

Reply via email to