[Checkins] SVN: grokproject/trunk/ No longer ask for the name of the module that will contain the

Philipp von Weitershausen philikon at philikon.de
Sun Nov 11 05:36:53 EST 2007


Log message for revision 81740:
    No longer ask for the name of the module that will contain the
    grok.Application subclass.  It's 'app.py' by default now, a rename
    is easy enough to do later on.
  
  

Changed:
  U   grokproject/trunk/CHANGES.txt
  U   grokproject/trunk/grokproject/__init__.py
  D   grokproject/trunk/grokproject/template/src/+package+/+module+.py_tmpl
  D   grokproject/trunk/grokproject/template/src/+package+/+module+_templates/
  A   grokproject/trunk/grokproject/template/src/+package+/app.py_tmpl
  A   grokproject/trunk/grokproject/template/src/+package+/app_templates/

-=-
Modified: grokproject/trunk/CHANGES.txt
===================================================================
--- grokproject/trunk/CHANGES.txt	2007-11-11 10:14:32 UTC (rev 81739)
+++ grokproject/trunk/CHANGES.txt	2007-11-11 10:36:52 UTC (rev 81740)
@@ -7,6 +7,10 @@
 * Each of the interactive questions can now be set with an commandline
   option.
 
+* No longer ask for the name of the module that will contain the
+  grok.Application subclass.  It's 'app.py' by default now, a rename
+  is easy enough to do later on.
+
 * Fix https://bugs.launchpad.net/bugs/161947: The buildout.cfg
   template contained the [data] section twice.
 

Modified: grokproject/trunk/grokproject/__init__.py
===================================================================
--- grokproject/trunk/grokproject/__init__.py	2007-11-11 10:14:32 UTC (rev 81739)
+++ grokproject/trunk/grokproject/__init__.py	2007-11-11 10:36:52 UTC (rev 81740)
@@ -18,8 +18,6 @@
     required_templates = []
 
     vars = [
-        var('module', 'Name of a demo Python module placed into the package',
-            default='app.py'),
         var('user', 'Name of an initial administrator user', default=NoDefault),
         var('passwd', 'Password for the initial administrator user',
             default=NoDefault),
@@ -29,12 +27,6 @@
 
     def check_vars(self, vars, cmd):
         vars = super(GrokProject, self).check_vars(vars, cmd)
-        module = vars['module']
-        if '.' in module:
-            if module.endswith('.py'):
-                vars['module'] = module[:-3]
-            else:
-                raise command.BadCommand('Bad module name: %s' % module)
         if vars['package'] in ('grok', 'zope'):
             print
             print "Error: The chosen project name results in an invalid " \

Deleted: grokproject/trunk/grokproject/template/src/+package+/+module+.py_tmpl
===================================================================
--- grokproject/trunk/grokproject/template/src/+package+/+module+.py_tmpl	2007-11-11 10:14:32 UTC (rev 81739)
+++ grokproject/trunk/grokproject/template/src/+package+/+module+.py_tmpl	2007-11-11 10:36:52 UTC (rev 81740)
@@ -1,7 +0,0 @@
-import grok
-
-class ${project}(grok.Application, grok.Container):
-    pass
-
-class Index(grok.View):
-    pass # see ${module}_templates/index.pt
\ No newline at end of file

Copied: grokproject/trunk/grokproject/template/src/+package+/app.py_tmpl (from rev 81736, grokproject/trunk/grokproject/template/src/+package+/+module+.py_tmpl)
===================================================================
--- grokproject/trunk/grokproject/template/src/+package+/app.py_tmpl	                        (rev 0)
+++ grokproject/trunk/grokproject/template/src/+package+/app.py_tmpl	2007-11-11 10:36:52 UTC (rev 81740)
@@ -0,0 +1,7 @@
+import grok
+
+class ${project}(grok.Application, grok.Container):
+    pass
+
+class Index(grok.View):
+    pass # see ${module}_templates/index.pt
\ No newline at end of file

Copied: grokproject/trunk/grokproject/template/src/+package+/app_templates (from rev 81736, grokproject/trunk/grokproject/template/src/+package+/+module+_templates)



More information about the Checkins mailing list