Thomas Lotze | 13 Oct 08:17

Naming of grok.provides

We recently noticed that the grok.provides directive is not well-named:

The documentation states that "if the local utility implements
more than one interface or if the implemented interface cannot be
determined, grok.provides() is required to disambiguate for what
interface the local utility will be registered."

OTOH, in zope.interface terminology, the term "provides" has a clear
meaning in contrast to "implements": if a class, for instance,
implements a certain interface, its instances are said to provide it.

We feel that something should be done about this contradiction of
terminologies as it confuses not only newcomers to Grok. Beyond a
documentation improvement, what would be an acceptable fix given that
this directive is rather close to Grok's core?

Thomas

--

-- 
Thomas Lotze · tl <at> gocept.com
gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 0 · fax +49 345 1229889 1
Zope and Plone consulting and development
_______________________________________________
Grok-dev mailing list
Grok-dev <at> zope.org
http://mail.zope.org/mailman/listinfo/grok-dev
(Continue reading)

muli | 13 Oct 08:38

newbie question: Handling file uploads with zope.app.file


I have started 1 week ago so please apologize my stupid question. I worked
thru the tutorial and most parts of the Developer notes so that i think that
i understand general what happens in the HowTo but...
i have made a file called FileContainer.py and a app.py looking like this:

class Test(grok.Application, grok.Container):
	pass
	
class Index(grok.View):
   pass 

How can i display the Form in a Browser?

AddForm is a special kind of View so i tried this:

class Test(grok.Application, grok.Container):
	pass
	
class Upload(grok.AddForm):
    grok.context(Test)......

But it didn't work!

so please help me.
muli
--

-- 
View this message in context: http://www.nabble.com/newbie-question%3A-Handling-file-uploads-with-zope.app.file-tp19949577p19949577.html
Sent from the Grok mailing list archive at Nabble.com.
(Continue reading)

Tim Cook | 10 Oct 22:33

Moving a Zope3 app to Grok

Hi All,

I am moving a Zope3 an application development platform to Grok in order
to provide an easier path for new developers to get started.  This
application is in the very early stages of development so I do not
envision this being a big deal.  Most of my code isn't even hooked up to
the Zope3 machinery yet.

The original project was started using zopeproject.  But of course over
time I have added several dependencies in my buildout.cfg  

I installed Grok and started the server and all was great.

I then did a clean svn export of the code and copied into a subdirectory
of the <project>/src/≤project> directory.  I didn't overwrite any of the
Grok config files.  Actually there are a couple of subdirs but that
doesn't matter.

When I try to start the Zope server now i see that Martian is doing some
introspecting in the code it found.  This is actually a good thing  I
suppose. :-)

The server fails to start because it found that I am importing pyparsing
in one of my files.  Now of course pyparsing is in my default eggs
directory.  
Traceback is:

  File
"/home/tim/.buildout/eggs/martian-0.11-py2.5.egg/martian/scan.py", line
191, in resolve
(Continue reading)

Yusei TAHARA | 11 Oct 00:02

Grok documentation review request

Hello,

I wrote a small how-to in grok website.
If someone in the document team have time, please review it.

Best regards,
--

-- 
Yusei TAHARA <yusei <at> domen.cx>
Jan-Wijbrand Kolman | 10 Oct 10:02

generic directoryresource in grokcore.view

Hi,

Grok views by default have access to a "static" directory for resources.
They're a special kind of the more general DirectoryResource feature of
Zope.

Since the resource "static" is always registered for the IDefaultBrowser
layer and I wanted to be able to skin resources too (in some case
leading to hard to debug error messages) I thought it would be nice to
have the more generic DirectoryResource feature available in Grok too.

I'm working on implementing the more general 'DirectoryResource' on a
branch of grokcore.view:

http://svn.zope.org/grokcore.view/branches/jw-generic_directory_resource/

I still need to add functional tests though, esp. concerning skinning.

Questions:

1) Do people feel this is useful to intergrate in grokcore.view?
2) Could someone have a quick look at the implementation?

kind regards,
jw

Re: grokproject error

El 9 Oct 2008, a las 15:49 , Jan Ulrich Hasecke escribió:
> Am 09.10.2008 um 14:33 schrieb Philipp von Weitershausen:
>>> No module named schemaless
>>> This is an old acquaintance.
>>
>> Yes. You probably still have an older version of ZConfig sitting in  
>> your Python's site-packages. Try creating the virtualenv with
>>
>>  virtualenv.py --no-site-packages
>
>
> I did this, but maybe it is due to the fact that in this virtualenv  
> I already created a Plone installation.

Quite possibly.

> Not too familiar with virtualenv, the question for me is. Must I  
> have one virtualenv for only each zope instance?

You don't *have to*, but it doesn't hurt, either. Creating virtualenvs  
is cheap. In this case, it would definitely have been a good idea due  
to the suspected influence of that Plone installation.
Jan Ulrich Hasecke | 9 Oct 14:20

grokproject error

While installing a new grokproject with 0.14 in a virtualenv I got  
this error:

While:
   Installing.
   Getting section app.
   Initializing section app.
   Loading zc.buildout recipe entry zc.zope3recipes>=0.5.3:application.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:

ImportError:
No module named schemaless

This is an old acquaintance.

juh

--

-- 
Business: http://hasecke.com --- Private: http://hasecke.eu --- Blog:  
http://www.sudelbuch.de --- History: www.generationenprojekt.de ---  
Europe: www.wikitution.org

Attachment (smime.p7s): application/pkcs7-signature, 2295 bytes
_______________________________________________
Grok-dev mailing list
Grok-dev <at> zope.org
(Continue reading)

Martijn Faassen | 9 Oct 13:12

installing grok 0.14 with an older grokproject fails

Hi there,

If have installed grokproject before 0.14 was released, and you use it 
to create a grok project, it does so, and of the 0.14 variety. 
Unfortunately it doesn't include the dependency on grokui.admin in 
setup.py, so you don't have any admin UI.

In order to have this feature and other fixes, you need to upgrade 
grokproject first:

$ easy_install -U grokproject

Regards,

Martijn
John de la Garza | 4 Oct 23:45

sample app BookShelf

I got BookShelf from:  svn://svn.zope.org/repos/main/grokapps/BookShelf

It didn't have a bookstrap.py, so I put one in.  It had  
bootstrap.cfg.  I am new to buildouts, is this ok to do?

When I ran this:  python2.4 bootstrap.py

I got this:
----------------------------------------
Creating directory '/Users/john/sameple_grok/grokapps/BookShelf/bin'.
Creating directory '/Users/john/sameple_grok/grokapps/BookShelf/parts'.
Creating directory '/Users/john/sameple_grok/grokapps/BookShelf/ 
develop-eggs'.
Generated script '/Users/john/sameple_grok/grokapps/BookShelf/bin/ 
buildout'.
Develop: '/Users/john/sameple_grok/grokapps/BookShelf/.'
Develop: '/Users/john/sameple_grok/grokapps/BookShelf/.'
While:
   Installing.
   Getting section eggbasket.
Error: The referenced section, 'eggbasket', was not defined.
pb:~/sameple_grok/grokapps/BookShelf john$ ./
pb:~/sameple_grok/grokapps/BookShelf john$ svn infoPath: .
URL: svn://svn.zope.org/repos/main/grokapps/BookShelf
Repository Root: svn://svn.zope.org/repos/main
Repository UUID: 62d5b8a3-27da-0310-9561-8e5933582275
Revision: 91758
Node Kind: directory
Schedule: normal
Last Changed Author: philikon
(Continue reading)

John de la Garza | 4 Oct 22:54

ZODB and storing, retrieving, deleting, use of ID

I'm making an app that has polls for voting... When I make a Poll  
object to I have to create an ID so I can find it again.  I'm comming  
froma RDBMS background and am wondering if there are any articles  
that would helpl me transistion.  For example should the ID be the  
last object id + 1?  I saw some sample code that kept the objects in  
a list then just got the length of the list, but if items are deleted  
then using the len as the ID could be trouble (not unique).... any  
feed back would be apprecitated.  I've read intro to ZODB (Jim  
Fulton) but it doesn't mention deleting
John de la Garza | 4 Oct 19:21

adding objects to context from __init__

In the tutorial the first demo of persistent objects did this:

class Sample(grok.Application, grok.Container):
     text = 'default text'

Then as the tutorial goes on they do this:

class Sample(grok.Application, grok.Container):
     def __init__(self):
         super(Sample, self).__init__()
         self.list = []

Why don't we have to add the string the same way as the list?

I mean the variable text gets persisted between restarts of the  
server, but if we added a list by doing this:

class Sample(grok.Application, grok.Container):
     list = []

it would be reset to empty every time we restarted the server

I'd expect text='default text' to have the same resetting as list=[]

What am I over looking?

Gmane