Christian Klinger | 16 Jan 07:56
Gravatar

Re: bypass UI adding application to grok AND multiple applications under /src howto?

Hi Matt,

ok do you have a configure.zcml in your new paster based package? In 
every case you need it with the
following content:

<configure xmlns="http://namespaces.zope.org/zope"
            xmlns:grok="http://namespaces.zope.org/grok">
<include package="grok" />
<grok:grok package="." />
</configure>

Be sure that this configure.zcml is picked up on startup.

If you now have for example in this package a app.py with the following 
content:

class MyNewApp(grok.Application):
     pass

You should see this new grok application  MyNewApp in the grok-admin 
interface.

If you have further questions please ask....

HTH
Christian

> Matt Rutherford <mailto:matrutherford <at> gmail.com>
> 16. Januar 2012 00:58
(Continue reading)

Matt Rutherford | 30 Jan 01:25
Picon
Gravatar

In Grok Web Dev book, where in ZODB under app root does the user's security data get saved?

I implemented (with a few edits for latest Grok version) my own PAU as a LocalUtility according to the end of Chapter 7 in the Grok web dev book. I'd like to base my app model around the user Account object detailed here, which is stored in the UserFolder container object that itself is an attribute of my authenticator plugin LocalUtility. But looking for these objects in the ZODB I cannot find it under my toplevel App object. I can see the 'grokcore.site.directive.local_utility' attribute and from this can get a grokcore.site.directive.LocalUtilityInfo object which gives some properties of the authenticator plugin that I want to access but not the underlying model.


How should I access my authenticator plugin and it's UserFolder attribute from my bin/python-console prompt?

thanks
Matt
_______________________________________________
Grok-dev mailing list
Grok-dev <at> zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
Christian Klinger | 28 Jan 09:05
Picon
Favicon
Gravatar

Grok Sprint

Hi,

we want to organize a Grok Sprint at the end of April around (27.4 - 
2.5) at our office at Novareto [1]. We have are very good metro 
connection to the airport of Nürnberg ( ca. 20 Minutes ).

Please mark the date in your schedule. :).

I will show up with more details soon.

You can contact me in irc my nick is goschtl or write me an email
cklinger <at> novareto.de

Christian

[1] 
http://maps.google.de/maps?q=novareto+GmbH,+Karolinenstra%C3%9Fe,+F%C3%BCrth&hl=de&ie=UTF8&ll=49.470801,10.987701&spn=0.157511,0.362206&sll=49.470162,10.986568&sspn=0.019689,0.045276&oq=novareto&hq=novareto+GmbH,&hnear=Karolinenstra%C3%9Fe,+90763+F%C3%BCrth,+Bayern&t=m&z=12

Possible-Topics:

- Get the WebSite Online
- Split catalog into grokcore.catalog
- Working on grokcore.startup and the wsgi stack
- new releases
- ...
Sebastian Ware | 24 Jan 14:24
Picon

Migrating the Grok website

Hi JW!

Just want to check in to see if we should go ahead with the site migration plans. I have a jailed user on a
server, it can check-out and generate the official docs.

I read the release notes and saw that the preferred procedure is to generate docs locally and push them with
"scp". This sounds even better, I could try the procedure and configure Nginx next week.

In which case we could dry run it before we update the DNS-records.

Do we have any other show stoppers?

Mvh Sebastian

http://www.urbantalk.se
Sylvain Viollon | 20 Jan 16:43
Favicon

grok.Role

Hello,

    Is there a reason why grok.Role is not in grokcore.security but in grok ?

    Regards,

  Sylvain,

--

-- 
Sylvain Viollon -- Infrae
t +31 10 243 7051 -- http://infrae.com
Hoevestraat 10 3033GC Rotterdam -- The Netherlands
Noe Nieto | 17 Jan 15:27
Favicon
Gravatar

How to assign roles to test user?

I'm doing some tests which requires permissions.

How do I assign permissions to a user in a test?



--
---
Noe Nieto
NNieto Consulting Services
M: nnieto <at> noenieto.com
W: http://noenieto.com
T:  <at> tzicatl
Li: Perfil en LinkedIn

_______________________________________________
Grok-dev mailing list
Grok-dev <at> zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
MarcelK | 17 Jan 13:33
Picon

Ajax-problem with grok

I got a problem within grok when I try to use a Ajax http-request.

This is what I do:

1. I have a render method on a view class called "set_invoice"
2. I have a form where I can choose "project" (form.project.group) &
"subroject (form.project.item)"
3. Once subproject is choosen, a onChange Event triggers the function below.
4. Within my render method, a validation is performed which return True or
False,
    depending on the values of "form.project.group" and "form.project.item"
5. This is where my problem begins: Within my render method, I dont have the
     values of group & item (project & subproject) on my request, like I
expected in
     the old Zope2 days.

QUESTION: How can I pass those field-values to the python method? It seems
to be impossible
to pass them via url-params or via request, sicne the request
(self.request.form) within my
python-method remains empty no matter I try to change it. 

below the function Project_fkt() that is called with onChange + the doGet:

......
    this.doGet = function(params) {
      // make a HTTP GET request to the URL asynchronously
      req.open("POST", url, true);
      //Send the proper header information along with the request
      req.setRequestHeader("Content-type",
"application/x-www-form-urlencoded");
      req.setRequestHeader("Content-length", params.length);
      req.setRequestHeader("Connection", "close");
      req.send(params);
    }
}
......

function Project_fkt(item) {
    var url = './set_invoice'
    var ajax = new AJAXInteraction(url, validateCallback);
    var params = 'form.project.group=' +
document.getElementsByName('form.project.group')[0].value; +
'&form.project.item=' + item.value;
    ajax.doGet(params);
}
....

--
View this message in context: http://python.6.n6.nabble.com/Ajax-problem-with-grok-tp3680518p3680518.html
Sent from the Grok mailing list archive at Nabble.com.
Christian Schmidt | 13 Jan 19:10
Picon
Favicon

bypass UI adding application to grok AND multiple applications under /src howto?

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

_______________________________________________
Grok-dev mailing list
Grok-dev <at> zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
Matt Rutherford | 4 Jan 14:31
Picon
Gravatar

upgrading grokproject's zodb version/installing the older version

As far as I can tell the grokproject version I easy_installed a few weeks back is using zodb 3.10.3 (how can I check for sure?). 


As I want to query the db offline I tried to install this zodb version on my gentoo system using emerge and the progress overlay. But the 3.10.3 version is no longer available perhaps due to security updates I think, so can I install the latest and still expect to connect to grokproject's older version of zodb?

Also how would I go about upgrading the zodb version my grokproject is using?
_______________________________________________
Grok-dev mailing list
Grok-dev <at> zope.org
https://mail.zope.org/mailman/listinfo/grok-dev
rutherford | 2 Jan 01:41
Picon
Gravatar

Can I query Grok's ZODB instance outside the web application scope?

I have a grok-based webapp that persists data using ZODB. Can I query the
Data.fs object db offline i.e. from a python script that would be run on the
webserver hosting the grok/paste webapp instance?

And would there be any issues in doing so while the web server is
interacting with the database simultaneously?

--
View this message in context: http://python.6.n6.nabble.com/Can-I-query-Grok-s-ZODB-instance-outside-the-web-application-scope-tp2729886p2729886.html
Sent from the Grok mailing list archive at Nabble.com.
Sylvain Viollon | 11 Jan 13:56
Favicon

Buildout is broken.

Hello,

  Grok buildout are broken at the moment, because well it is buildout. download.zope.org is down, so it
cannot read the ztk include files.

  I think we should try to copy, at least for releases, all the files on the same server. That prevent to lookup
ten servers, that is slower with an already slow system, and that's nine time less chances to have its
buildout broken because a server is broken.

  Plone people already does it, because of that I am sure. I guess it would be possible, if it doesn't exist
already, to automatize this.

  Regards,

  Sylvain,

PS: Soon zeam.setup.base will fix all this problems.
--

-- 
Sylvain Viollon -- Infrae
t +31 10 243 7051 -- http://infrae.com
Hoevestraat 10 3033GC Rotterdam -- The Netherlands

Gmane