<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">Hi Matt,<br>
<br>
ok do you have a configure.zcml in your new paster based package? In 
every case you need it with the<br>
following content:<br>
<br>
&lt;configure xmlns=<a class="moz-txt-link-rfc2396E" href="http://namespaces.zope.org/zope">"http://namespaces.zope.org/zope"</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:grok=<a class="moz-txt-link-rfc2396E" href="http://namespaces.zope.org/grok">"http://namespaces.zope.org/grok"</a>&gt;<br>
&nbsp; &lt;include package="grok" /&gt;<br>
&nbsp; &lt;grok:grok package="." /&gt;<br>
&lt;/configure&gt;<br>
<br>
<span>Be sure that this configure.zcml is picked up on startup. </span><br>
<br>
<br>
If you now have for example in this package a app.py with the following 
content:<br>
<br>
class MyNewApp(grok.Application):<br>
&nbsp;&nbsp;&nbsp; pass<br>
<br>
You should see this new grok application&nbsp; MyNewApp in the grok-admin 
interface.<br>
<br>
If you have further questions please ask....<br>
<br>
HTH<br>
Christian<br>
<br>
<br>
<br>
<br>
<blockquote style="border: 0px none;" 
cite="mid:CAGRtG9eRiS79jdbnO+htc7KUiah5p463_tnXt9VFEWTNKjqe-Q@mail.gmail.com"
 type="cite">
  <div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div 
style="display:table;width:100%;border-top:1px solid 
#EDEEF0;padding-top:5px">         <div 
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
 photoaddress="matrutherford@gmail.com" photoname="Matt Rutherford" 
src="cid:part1.09070508.01050101@novareto.de" name="postbox-contact.jpg"
 height="25px" width="25px"></div>   <div 
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
           <a moz-do-not-send="true" href="mailto:matrutherford@gmail.com" 
style="color:#737F92 
!important;padding-right:6px;font-weight:bold;text-decoration:none 
!important;">Matt Rutherford</a></div>   <div 
style="display:table-cell;white-space:nowrap;vertical-align:middle;">   
  <font color="#9FA2A5"><span style="padding-left:6px">16. Januar 2012 
00:58</span></font></div></div></div>
  <div style="color:#888888;margin-left:24px;margin-right:24px;" 
__pbrmquotes="true" class="__pbConvBody">Hi Christian.<div><br></div><div>I
 too am looking to create multiple applications under src and I followed
 your advice to generate a basic python package using paster, placed it 
under src/, changed the buildout.cfg and rebuilt.</div>
<div><br></div><div>I have placed my new app.py, etc in this package but
 I am unsure how to use this new app class to create an application 
instance on the grok admin panel UI. When I go to create new app it is 
always of the original default project app type. Can you point me in the
 right direction?</div>
<div><br></div><div>cheers</div><div>Matt</div><div><br><br></div>

  </div>
  <div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div 
style="display:table;width:100%;border-top:1px solid 
#EDEEF0;padding-top:5px">         <div 
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
 photoaddress="cklinger@novareto.de" photoname="Christian Klinger" 
src="cid:part2.03080602.04070209@novareto.de" name="postbox-contact.jpg"
 height="25px" width="25px"></div>   <div 
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
           <a moz-do-not-send="true" href="mailto:cklinger@novareto.de" 
style="color:#737F92 
!important;padding-right:6px;font-weight:bold;text-decoration:none 
!important;">Christian Klinger</a></div>   <div 
style="display:table-cell;white-space:nowrap;vertical-align:middle;">   
  <font color="#9FA2A5"><span style="padding-left:6px">14. Januar 2012 
09:17</span></font></div></div></div>
  <div style="color:#888888;margin-left:24px;margin-right:24px;" 
__pbrmquotes="true" class="__pbConvBody">Hi
<br>
<br>Christian Schmidt schrieb:
<br><blockquote type="cite">Hi there,
<br>
<br>We are testing if grok is the solution for us to develop our new 
user
<br>interface. We are discussing and testing the grok framework 
consulting
<br>the grok tutorial and the book of Carlos de la Guardia - Grok 1.0 
Web
<br>Development.
<br>
<br>One of our programmers has the opinion that it would be hard to 
place it
<br>under version control - referring
<br><a class="moz-txt-link-freetext" href="http://grok.zope.org/documentation/how-to/placing-your-grok-project-under-version-control">http://grok.zope.org/documentation/how-to/placing-your-grok-project-under-version-control</a>.
<br>
<br>
<br>
<br>Problem is - he is thinking - the data.fs ZODB. But, we don't save
<br>userdata there - all data will be stored with sqlalchemy under 
postgres.
<br>So there would be clean rebuild for any new installation if data.fs 
does
<br>not exists. But, is there a way to bypass adding the application 
name
<br>into the Grok UI? - I have googled that, but found nothing.
<br>
<br>The idea is, that we download our application from svn or git, make a
<br>python bootstrap.py and bin/buildout and all works out of the box - 
on
<br>every developers local box or production server. - no application 
name
<br>UI adding.
<br>
<br></blockquote>
<br>You can do this easily with zope.generations. There is an howto
<br>for using it. You can find it here.
<br>
<br><a class="moz-txt-link-freetext" href="http://grok.zope.org/doc/community/topics/generations.html">http://grok.zope.org/doc/community/topics/generations.html</a>
<br>
<br>I guess you have to add a missing zcml statement in configure.zcml
<br>
<br>&lt;include package="zope.generations" 
file="subscriptions.zcml"/&gt;
<br>
<br>
<br><blockquote type="cite">Our further goal is to manage different 
things. We need something like
<br>this:
<br>
<br><a class="moz-txt-link-freetext" href="http://EXAMPLE.com/customers/show">http://EXAMPLE.com/customers/show</a> | edit | etc.
<br><a class="moz-txt-link-freetext" href="http://EXAMPLE.com/mailadmin/">http://EXAMPLE.com/mailadmin/</a>
<br><a class="moz-txt-link-freetext" href="http://EXAMPLE.com/mailadmin/domains">http://EXAMPLE.com/mailadmin/domains</a>
<br><a class="moz-txt-link-freetext" href="http://EXAMPLE.com/mailadmin/domains/add">http://EXAMPLE.com/mailadmin/domains/add</a>
<br><a class="moz-txt-link-freetext" href="http://EXAMPLE.com/mailadmin/domains/delete">http://EXAMPLE.com/mailadmin/domains/delete</a>
<br><a class="moz-txt-link-freetext" href="http://EXAMPLE.com/mailadmin/domains/useraccount/add">http://EXAMPLE.com/mailadmin/domains/useraccount/add</a>
<br><a class="moz-txt-link-freetext" href="http://EXAMPLE.com/mailadmin/domains/useraccount/list">http://EXAMPLE.com/mailadmin/domains/useraccount/list</a>
<br><a class="moz-txt-link-freetext" href="http://EXAMPLE.com/mailadmin/domains/useraccount/delete">http://EXAMPLE.com/mailadmin/domains/useraccount/delete</a>
<br>
<br>
<br>Do we need to create multiple applications under src/? - what would 
be
<br>the right way?
<br>
<br>My Idea was:
<br>
<br>[localpy] %grokproject myproject
<br>[localpy] %cd myproject/
<br>[localpy] %python bootstrap.py
<br>[localpy] %bin/buildout
<br>
<br>creates myproject with the default structure.
<br>
<br>[localpy] %ls src/
<br>
<br>myproject/src/__init__.py
<br>myproject/src/app_templates
<br>myproject/src/resource.py
<br>myproject/src/tests
<br>myproject/src/app.py
<br>myproject/src/configure.zcml
<br>myproject/src/static
<br>
<br>
<br>[localpy] %bin/paster serve parts/etc/debug.ini
<br>
<br>Starting the Server the UI shows no application:
<br>"Currently no working applications are installed."
<br>
<br>To enable the default application "myproject" I have to add the
<br>application to grok. The only way I know is to add this unter der 
Server
<br>UI.
<br></blockquote>
<br>You can use zope.generations as mentioned on top of the response.
<br>
<br><blockquote type="cite"><br>If I want now create an other 
application under src. How would I do
<br>that? I want to have ie:
<br>
<br>mailadmin/src/__init__.py
<br>mailadmin/src/app_templates
<br>mailadmin/src/resource.py
<br>mailadmin/src/tests
<br>mailadmin/src/app.py
<br>mailadmin/src/configure.zcml
<br>mailadmin/src/static
<br>
<br>
<br>My Idea was to copy all files from myproject to mailadmin and change
 the
<br>template. Is there a paster - template available for that job? 
(creating
<br>a grok sub-application under src)
<br></blockquote>
<br>
<br>What i do is to generate a basic python package via paster. I copy 
this 
new package in src directory of my generated grokproject. This would be
<br>in your case something like:
<br>
<br>myproject/src/myproject/...
<br>myproject/src/mailadmin/... &lt;-- This is my generated paster 
package
<br>
<br>Ok now you have to change a line in your buildout.cfg file.
<br>
<br>develop = .
<br>
<br>into
<br>
<br>develop = . src/mailadmin
<br>
<br>rerun bin/buildout. And you can start to add classes to your new 
mailadmin package.
<br>
<br><blockquote type="cite"><br>Adding this mailadmin application to 
grok whit the UI does not the job,
<br>because http//127.0.0.1:8080/mailadmin shows the template of
<br>myproject/app_templates/index.pt not 
mailadmin/app_templates/index.pt.
<br>
<br>How to add mailadmin to the grok application, enable the application
 so
<br>my request for http//127.0.0.1:8080/mailadmin shows
<br>mailadmin/app_templates/index.pt. Do I have to add it to any 
configfile
<br>as well?
<br>
<br>I found that this should be possible, but not how in detail:
<br>
<br><a class="moz-txt-link-freetext" href="https://mail.zope.org/pipermail/grok-dev/2010-August/010542.html">https://mail.zope.org/pipermail/grok-dev/2010-August/010542.html</a>
<br>
<br>I hope that i have written all detailed enough an think that many 
other
<br>have the same problems in understanding grok and I would be glad, if
<br>someone helps me to take the first cliffs.
<br></blockquote>
<br>BTW you can join the grok-irc channel. Sometimes you get really fast
 
help from there.
<br>
<br>If you have further questions, please let me know.
<br>
<br>Chrisitan
<br>
<br>
<br><blockquote type="cite">
<br>Kind regards
<br>
<br>Christian
<br>
<br>
<br>
<br></blockquote></div>
</blockquote>
</body></html>