[Grok-dev] bypass UI adding application to grok AND multiple applications under /src howto?
Christian Schmidt
grok-list at creativenet.de
Fri Jan 13 18:10:14 UTC 2012
Hi there,
We are testing if grok is the solution for us to develop our new user
interface. We are discussing and testing the grok framework consulting
the grok tutorial and the book of Carlos de la Guardia - Grok 1.0 Web
Development.
One of our programmers has the opinion that it would be hard to place it
under version control - referring
http://grok.zope.org/documentation/how-to/placing-your-grok-project-under-version-control.
Problem is - he is thinking - the data.fs ZODB. But, we don't save
userdata there - all data will be stored with sqlalchemy under postgres.
So there would be clean rebuild for any new installation if data.fs does
not exists. But, is there a way to bypass adding the application name
into the Grok UI? - I have googled that, but found nothing.
The idea is, that we download our application from svn or git, make a
python bootstrap.py and bin/buildout and all works out of the box - on
every developers local box or production server. - no application name
UI adding.
Our further goal is to manage different things. We need something like this:
http://EXAMPLE.com/customers/show | edit | etc.
http://EXAMPLE.com/mailadmin/
http://EXAMPLE.com/mailadmin/domains
http://EXAMPLE.com/mailadmin/domains/add
http://EXAMPLE.com/mailadmin/domains/delete
http://EXAMPLE.com/mailadmin/domains/useraccount/add
http://EXAMPLE.com/mailadmin/domains/useraccount/list
http://EXAMPLE.com/mailadmin/domains/useraccount/delete
Do we need to create multiple applications under src/? - what would be
the right way?
My Idea was:
[localpy] %grokproject myproject
[localpy] %cd myproject/
[localpy] %python bootstrap.py
[localpy] %bin/buildout
creates myproject with the default structure.
[localpy] %ls src/
myproject/src/__init__.py
myproject/src/app_templates
myproject/src/resource.py
myproject/src/tests
myproject/src/app.py
myproject/src/configure.zcml
myproject/src/static
[localpy] %bin/paster serve parts/etc/debug.ini
Starting the Server the UI shows no application:
"Currently no working applications are installed."
To enable the default application "myproject" I have to add the
application to grok. The only way I know is to add this unter der Server UI.
If I want now create an other application under src. How would I do
that? I want to have ie:
mailadmin/src/__init__.py
mailadmin/src/app_templates
mailadmin/src/resource.py
mailadmin/src/tests
mailadmin/src/app.py
mailadmin/src/configure.zcml
mailadmin/src/static
My Idea was to copy all files from myproject to mailadmin and change the
template. Is there a paster - template available for that job? (creating
a grok sub-application under src)
Adding this mailadmin application to grok whit the UI does not the job,
because http//127.0.0.1:8080/mailadmin shows the template of
myproject/app_templates/index.pt not mailadmin/app_templates/index.pt.
How to add mailadmin to the grok application, enable the application so
my request for http//127.0.0.1:8080/mailadmin shows
mailadmin/app_templates/index.pt. Do I have to add it to any configfile
as well?
I found that this should be possible, but not how in detail:
https://mail.zope.org/pipermail/grok-dev/2010-August/010542.html
I hope that i have written all detailed enough an think that many other
have the same problems in understanding grok and I would be glad, if
someone helps me to take the first cliffs.
Kind regards
Christian
--
Christian Schmidt
Geschäftsführer
CreativeNet Service GmbH
Astrid-Lindgren-Str. 35
30966 Hemmingen
Tel. 01805 666 110 *
Fax. 01805 666 109 *
Handelsregister: AG Hannover HRB 60276
Geschäftsführer: Christian Schmidt
Firmensitz: Hemmingen
UST.-Nr.: DE 212474891
* 14 cnt aus dem Festnetz
* max. 42 cnt aus dem Mobilfunknetz
More information about the Grok-dev
mailing list