Planet Zope

        Zope related news
 

May-09

Please run a test for me (it takes only minutes)


In my post on Python and time zones I mentioned that I hadn’t tried this on Windows yet. But now I have, and I have painstakingly and with help from several Mac OS X users come up with something that may be a way of getting the time zone information reliably on both Linux, Mac OS X and Windows. But of course, I’m not sure.

So therefore, I’d like to ask you, dear reader, to make a quick test for me. Especially if you live in a strange timezone, or have an unusual os, or weird time zone setup, or anything else.

The steps are as follows:

svn co http://www.plone4artists.org/svn/projects/Plone4ArtistsCalendar/tztest/trunk tztest
cd tztest
python tztest/__init__.py

Whatever the output is, paste it as a comment on this blog post. If you get an unexpected result, i.e. and error, or if the time zone printed is wrong, then *please* leave a correct email address when you fill in the comment.



May-08

Plone.it - italian community website

Feed: Plone News
plone.it is the new community website about Plone in Italy.

ore.xapian - indexing and searching in zope3


i released the ore.xapian package to pypi a few weeks back, and after a few iterations i’ve got in production on few small applications, its a thin layer on top of xappy to give an indexing framework for zope3 based applications.

its pretty xapian agnostic.. its designed as an async indexing framework, with abstractions for content indexers, content storage/ resolution, transactional flush into the indexing queue, manages reopening search connections, etc.

the pypi page goes into a bit more detail (doctest style).
http://pypi.python.org/pypi/ore.xapian

i’m using it succesfully to index content from relational databases and subversion with a zope3 front end. only real todo is to make the index queue persistent for remote indexers, but to be useful that
would need corresponding support for remote search connections in xappy. unfortunately i don’t have the bandwidth for the latter atm, but the details are here.

http://groups.google.com/group/xappy-discuss/browse_thread/thread/7ae9fb8d212529b2



May-07

repoze.plone 2.5.5 and repoze.zope2 2.9.8 Released

For the oldskool, we've released versions of repoze.plone and repoze.zope2 which are capable of running Plone 2.5.5 and Zope 2.9.8. Previously, folks who had wished to run Plone under repoze.zope2 were limited to running either Plone 3.0.6 or 3.1.1. There are plenty of folks out there who can't move to any version of Plone 3 just yet. These releases are for you. Instructions are below about how to get Plone 2.5.5 and/or Zope 2.9.8 installed so they run under repoze.zope2. We support both buildout and virtualenv-based installs, so each is documented separately.

Installing Plone 2.5.5 (implies Zope 2.9.8)

Install repoze.plone 2.5.5 using Buildout

$ svn co http://svn.repoze.org/buildouts/repoze.plone/branches/2.5.5
$ cd 2.5.5
$ python2.4 bootstrap.py
$ bin/buildout
.. follow instructions here on in ..

... or install repoze.plone 2.5.5 using Virtualenv

$ virtualenv24 --no-site-packages plone255
$ cd plone255
$ bin/easy_install -i http://dist.repoze.org/plone/2.5.5/simple repoze.plone
$ bin/mkzope2instance .
$ bin/addzope2user admin admin
$ bin/paster serve etc/zope2.ini

Installing Zope 2.9.8 only (if you don't use Plone)

Install repoze.zope2 2.9.8 using Buildout

$ svn co http://svn.repoze.org/buildouts/repoze.zope2/branches/2.9
$ cd 2.9
$ python2.4 bootstrap.py
$ bin/buildout
.. follow instructions here on in ..

Install repoze.zope2 2.9.8 using Virtualenv

$ virtualenv24 --no-site-packages zope298
$ cd zope298
$ bin/easy_install -i http://dist.repoze.org/zope2/2.9/simple repoze.zope2
$ bin/mkzope2instance .
$ bin/addzope2user admin admin
$ bin/paster serve etc/zope2.ini

One good thing about doing this work is that it's becoming a little clearer how we need to lay out our distribution site (dist.repoze.org) to support multiple build revisions of the same piece of software. I haven't managed yet to clean it up entirely but I think I know how to now.

Have fun!

-C


Creating a Python 2.4, Plone and Zope Development Environment on Mac OS X Leopard

Feed: Stereoplex
Compiling Python, Zope and Plone on Leopard isn't as easy as it is on Linux. Here's a walkthrough of the process, from a bare Leopard install right through to having a working Plone 3 development environment, using paster and buildout.

Pycon FR is coming up - may 17/18 - ask the program


Pycon FR will take place in Paris, may 17/18, at the Cité des sciences et de la Villette.

A very rich program will be presented:

  • Learn Python first ! (Eric LEBIGOT)
  • Graphviz made easier with GvGen (Sebastien Tricaud)
  • Genes research with Python (Andre Espaze)
  • CouchDB (Benoit Chesneau)
  • PyPy explained (Victor Stinner)
  • Quality Assurance (Julien Jehannet)
  • Zope 3 overview (Christophe Combelles)
  • Scapy in action (Renaud Lifchitz)
  • E-sonoclaste, multimedia annotations (Vincent Rioux)
  • Why Django ? (David Larlet)
  • PLUIE project (Michel Claveau)
  • WSGI in practice using Paste (Gael Pasgrimaud)
  • Distributed Version Control with Mercurial (Michael SCHERER)
  • Create and deploy Python apps with zc.buildout (Tarek Ziadé)
  • Django everyday: quality and performance (David Larlet)
  • Python 3000 (Victor Stinner)

There will be lightning talks as well, and the French speaking user group (Afpy) will have its annual meeting on sunday morning. A second room will be available for sprints and BoF sessions as well. All the talks will be in French this year

If you are around Paris, please join use ! It free !

Otherwise, watch the talks in the live stream: http://fr.pycon.org/stream-live

Thanks to our partners, for making this happen:

  • The Python Software Foundation
  • Logilab
  • Nerim
  • Ingeniweb
  • Resolver Systems
  • Pilot Systems
  • WingWare
  • Makina Corpus
  • Toonux
  • ActiveState
  • Gymglish
  • Eyrolles
  • Cité des Sciences et de la Vilette


May-06

Plone Symposium early bird registration extended!

Feed: Plone News
Early Bird registration has been extended to May 12, 2008. Buy your tickets now, and reserve your room by for discounted rates!

Update - Repoze under mod_wsgi is not slow

It helps to know what you're doing!

Announcing plone.it - italian community website for Plone

The new Plone.it portal is addressed to the italian community of Plone users and developers: it aims to provide documentation about Plone in italian, visibility and aggregation for the italian community, and a channel to find and contribute localized material for the promotion of Plone.

Plone Paris Sprint wrapup #3, new.plone.org, collective.dist released !


The main task I worked on during the sprint with Alex and Matthew was making PloneSoftwareCenter ready for the new version of Plone.org. These guys rock. We did tons of things and the new plone.org website is coming up. Alex worked for quite a while on migrating plone.org to plone 3, but let me focus on the software center part.

First of all, let me explain what is the final goal of the work done in the software center.

The future of Plonistas: a 100 % egg-based world and what is means for production

Since a few years, Zope code base was moved into a set of namespaced packages. Plone is following closely. From there zc.buildout is providing a simple way to pick up the right set of packages to build an application. This set is automatically chosen by recipes at Zope and Plone level. Then developers add their own packages and dependencies to provide custom features in their applications.

This mechanism means that each team has to:

  • make distributions of packages (tarball, eggs, ..)
  • build the application with buildout, then release a source distribution
  • and provide a way for other developers to build the application on their own, by:
    • publishing the buildout configuration files
    • pushing the packages the buildout uses into to a server that is reachable by developers
    • make sure Plone and Zope packages are also reachable

This means that each team is responsible at least to release packages.

Distutils and Cheeseshop

Distutils provides two commands to publish packages to the world: register and upload. These commands were intended to provide to the developer a way to push packages to any server that supports the protocol, by using the –repository option.

But in reality, the only server that is publicly available is the Cheeseshop (pypi.python.org). Furthermore Distutils is not providing everything needed to work with another server than the Cheeseshop, like I will explain later in this post. So all Plone and Zope packages are uploaded there.

Therefore, pypi.python.org became a single point of failure when you need to build a Plone or Zope application. With the growth of the community, this means that the repository will get bigger and have to deal with more and more request. PyPI weight around 4 gigas at this time, of zip files and tarballs.

While the actual server is really fast, it makes it a bit hard to work when it is down. It didn’t happen often. Twice as far as I remember. But when it happens, the crowd that uses zc.buildout is frozen because they run buildouts several time per day. They can use cache of course, as long as those are up-to-date.

Some mirrors emerged, like http://release.ingeniweb.com/pypi.python.org-mirror. Some enhanced indexes were created as well, like http://download.zope.org/simple, which is still referring to pypi.python.org but performs a bit of crawling to speed things up when a buildout uses it through easy_install.

But all of these are just enhancement to a cheeseshop-centric model.

Furthermore, in case of a private application, you do not want to see packages in the Cheeseshop but you might also want to provide developers a similar way to manage and use them.

Plone.org software center is dying !

For public applications, given the fact that Distutils provides a simple way to push a package to a public location (one shell command), people have started to stop updating the Products section of Plone.org. This happens because updating it means doing a whole lot more than the simple register+upload call. You need to login into the website, then manually upload the packages, then change the front page of the product if needed etc..

So being able to push packages to plone.org with the same set of commands, is the right solution for developers.

Pushing a package means uploading a public archive but it also means updating the front page for the given package, with the register command.

That what I worked on, at PloneSoftwareCenter level, continuing Sidnei’s work: making it act like Cheeseshop. Now the feature is ready and being alpha-tested at new.plone.org

Toward a distributed model

Playing with several egg-based servers

What we will be able to do from there, is to distribute packages (in blue) to the Cheeseshop (2) as usual, but also to Plone.org (1). Having such a tool also allows people to run other cheeseshop-like servers, wether they are public (3) or private (4). This is useful when you are working on customer projects and do not wish to make their packages available to the world, or even if it is a public project, you do not want to push them to PyPi.

Furthermore, it allows having a bit of redundancy : your packages become available in several places, which is better. Think about the mirrors at Sourceforge, same thing here…

This distributed model is used at Ingeniweb, and in other companies I am starting to list (If you do please let me know, this is important to promote the tool).

The new Plone Software Center (PSC)

If you are extensively working with packages and buildouts, you should consider trying the new PSC, read http://tarekziade.wordpress.com/2008/03/20/how-to-run-your-own-private-pypi-cheeseshop-server/ for this. Each project now in the software center can hold several eggs, and it makes it possible to provide a nice deployment model for your teams: developer push packages releases in such a server with the distutils standards, while customers or deployers can build their applications by picking them up through their buildouts.

And it is in Plone, so you can provide extensive features, like a bug tracker, and all the sweet things Plonecan provide.

The work left to be done in PSC is :

  • making the storage for archives (tgz, egg) pluggable so new storing strategies can be provided in separate packages, under the collective.psc namespace, I started this work in a branch.
  • finish the collective.psc.mirroring package, that will be used in plone.org to fill a system folder, in order to provide an Apache direct view over the archives stored. This will make zc.buildout / easy_install use this stream rather than hitting the Plone instance. Although the final goal will be to transform it into a storage strategy, but time is running and this is useful now for plone.org.
  • extensive tests on new.plone.org

collective.dist

To be able to deal with several servers, I have released collective.dist after the sprint (previously iw.dist). This package provides two new distutils commands: mupload and mregister, together with a new pypirc format.

Follow the documentation, and you will be set in a matter of minutes. This package is already used by many developers to make their life easier, and will help you when the new plone.org goes live.

disutils evolution

collective.dist is an evolution of distutils I have been working at Python level for months. It is available as a Python patch here : http://bugs.python.org/issue1858. mregister and mupload are just modified register and upload commands that makes it possible to interact with several PyPi-like servers, that’s it. PSC uses Distutils standards in any case, so it is possible to use the regular register and upload commands with it of course. It is just not convenient because you will need to have the same username and password on both CheeseShop and the third-party egg server (or change your pypirc file everytime :D)

So the patch, basically, just makes the -r option of distutils commands a 100% operational.

Now my job is to convince Python core developers it should be integrated into Python 2.6, and I am working on this. It is a logical evolution, but it sounds overkill to some people that does not have this kind of need: “Why changing that ? we have only one package server, which is the cheeseshop”.

It can also sound to some of them like I am (together with the team of 20 developers we have ) the only person on earth that wishes it, but as soon as the new Plone.org will be online, a lot of people will start needing such a feature. But having it in 2.6 will make it available as a standard in Plone/Zope world in… a few years.

In any case, most of them agree in the fact that this change is logical and that the current pypirc format is not to be kept. So I guess it is just a matter of time and patience.


Choosing a License

I thought I’d take some time to talk about licensing.

Licensing is something that F/OSS programmers talk about a lot. There’s two major categories of licenses:

  • The GPL, aka Copyleft. You must distribute source with your application, and users get full rights to the source code, including any additions you may make.
  • Permissive licenses, X/MIT, BSD, etc. These let you do pretty much everything.

There’s also the LGPL, which vaguely applies GPL-like terms to the original code, but is not "viral". LGPL originally meant "Library GPL" but was renamed to "Lesser GPL" because people automatically used it for libraries without considering what the license actually enforced.

How much do these licenses matter? How should a person choose between these options?

First, the LGPL. It has specific phrasing that makes some sense for C code, to distinguish between extending the library itself and using the library. It doesn’t make much sense for other runtime environments. Some people have tried to clarify its meaning in other environments, but I’m not sure if a clarification like that means much. The ambiguity seems like the worst of all worlds. People who are afraid of the GPL won’t use the software anyway. People who act in bad faith can satisfy the terms of the license through trickery. You don’t get any practical protection over a permissive license, and you get most of the stigma of the GPL. The GPL has some success stories, places where source was actually released due to the terms of the license. I don’t know of any similar success stories for the LGPL. If you don’t want to use the GPL, just use a permissive license.

Then the question: GPL or permissive licensing?

For some time I’ve chosen a permissive license for my code. But I’m not really advocating that, and every so often I throw out a little GPL code. Underneath this is something of a disinterest in licensing. I don’t think it means much. If specifics of your license matters then something has gone wrong. People are leeching code, and/or the community isn’t providing enough benefit to encourage participation. I don’t believe that software has much intrinsic worth, and treating it like property doesn’t make that much sense to me. Licensing treats software as property, which is why I see the relevance of licensing as a kind of disfunction. But there is the outside chance that it’s really just a big project, or that the project is being participated in by rivals. But nothing I work with is like this, and it’s pretty uncommon generally, and anyway those projects all have their licensing pretty much figured out.

The GPL does seem to serve a constructive purpose when rivals have to cooperate in some fashion. It makes a kind of demilitarized zone where everyone has to work for the collective good. But even this is a sign that you can’t trust the participants. This is somewhat reasonable, because you can’t actually trust large corporations with faceless programmers working on the code. But even that’s a kind of disfunction, because you can at least kind of trust large corporations with programmer employees who have a public face. The individual programmers are going to be very uncomfortable participating in any kind of Machiavellian conspiracy. Good open source projects are a coming together of individuals. Institutions are not effective participants. There are however scaling issues with individual participation: particularly that only a minority of developers are actually inclined to participate in this way. An institution can pay someone to work on something they don’t care very deeply about, and that person can still do useful work. But they won’t be part of the community.

Outside of this mediation of rivalries I’m not really sure what the GPL provides. It protects users, because the terms of the GPL ensure that users get code. It doesn’t actually ensure that code is made public, though it does give developer employees leverage to make their work public. There’s some urban legends about the viral aspect of the GPL, but that’s really just bullshit. Code doesn’t magically get relicensed just because there’s a little GPL in the mix. The GPL police won’t show up at your door and confiscate your computers. The only people who make those claims are GPL-haters like Microsoft. Who should you trust: the FSF or Microsoft? If you answered "Microsoft" then you need to get your head screwed on straight.

Unfortunately there is a stigma about the GPL, and there are competent developers that avoid all GPL software. I find this frustrating, especially since I don’t actually care about licensing, and so this adds a point of contention that I don’t really care to pay attention to. Some people in this situation then become GPL haters, because they feel like it’s all GPL’s fault. But the GPL didn’t create the licensing situation — proprietary software started this. Direct your hate where it belongs. The GPL ain’t it.

If my libraries were GPL I doubt I could leverage that to make other people open source their code. But I know I would alienate some people, and as a result I choose a permissive license because it’s just strategically advantageous.

Applications I think are different strategically. You don’t just swap an application in and out like you might a library. If you choose to use an application, then often the licensing is a secondary choice. The licensing ultimately only really applies to extensions. Libraries also have a different pattern of acceptance. Stubborn GPL haters can in effect veto a library in many projects (this is because stubborn GPL haters are viral). But in an application their influence is much smaller. Developers concerns like architecture and choice of libraries are not what drives an application. An application is driven by its functionality. If you have a useful application then licensing tends to be a secondary concern. The licensing tends to define the community in some sense as well, and as a result there’s a kind of opt-in consensus. And I think the GPL in these cases really does create an environment of collaboration around extensions. It has a real benefit.

This seems to be true empirically as well. GPL’d libraries don’t tend to get very popular. People will do crazy-big projects just because of licensing issues. GPL’d Applications seem to do quite well, with examples like WordPress, Plone, The Gimp, and even the Linux kernel, which is closer in structure to an application than a library.

I haven’t studied the GPL v3 very closely, but it seems useful to me. Software-as-a-service has the potential to make the GPL irrelevant (especially for the kind of code I write), and could put the GPL in the same category as the LGPL where it retains its stigma without offering any practical advantages. Version 3 makes the permission/GPL choice seem useful, but so far I’ve never made any truly conscious choice between version 2 and 3.

If you are thinking about choosing a license, or thinking about choosing software based on the licensing, maybe these thoughts will be helpful in your own thinking. And please don’t GPL-hate in the comments, I’m not interested and if you feel the need then go write your own post.

Update: I wrote a second article to expand on some thoughts: The GPL and Principles



May-04

Martin Aspeli's "Rolling Out Repoze"

Martin Aspeli writes a fairly lengthy article detailing how he's moved his personal blog over to running under repoze.plone as well as configuration of another set of applications under repoze+plone + mod_wsgi + deliverance.


Rolling out Repoze

Back to the future

repoze.who 1.0 Released

Version 1.0 of the repoze.who WSGI authentication framework has been released. You can get it via easy_install -i http://dist.repoze.org/simple repoze.who.

Version 1.0 has optional support for middleware configuration via a config file (thanks to Tres). Being a framework, repoze.who is configuration-heavy, and it can provide a better separation of concerns and more convenience to wire it up via a configuration file than via Python code. So rather than configuring the middleware and attendant plugins via straight Python code, you can now wire who configuration up in an .ini file:

    # who.ini

    [plugin:form]
    # identification and challenge
    use = repoze.who.plugins.form:make_plugin
    login_form_qs = __do_login
    rememberer_name = cookie
    form = %(here)s/login_form.html

    [plugin:auth_tkt]
    # identification
    use = repoze.who.plugins.auth_tkt:make_plugin
    secret = s33kr1t
    cookie_name = oatmeal
    secure = False
    include_ip = False

    [plugin:basicauth]
    # identification and challenge
    use = repoze.who.plugins.basicauth:make_plugin
    realm = 'sample'

    [plugin:htpasswd]
    # authentication
    use = repoze.who.plugins.htpasswd:make_plugin
    filename = %(here)s/passwd
    check_fn = repoze.who.plugins.htpasswd:crypt_check

    [plugin:sqlusers]
    # authentication
    use = repoze.who.plugins.sql:make_authenticator_plugin
    query = "SELECT userid, password FROM users where login = %(login)s;"
    conn_factory = repoze.who.plugins.sql:make_psycopg_conn_factory
    compare_fn = repoze.who.plugins.sql:default_password_compare

    [plugin:sqlproperties]
    name = properties
    use = repoze.who.plugins.sql:make_metadata_plugin
    query = "SELECT firstname, lastname FROM users where userid = %(__userid)s;"
    filter = my.package:filter_propmd
    conn_factory = repoze.who.plugins.sql:make_psycopg_conn_factory

    [general]
    request_classifier = repoze.who.classifiers:default_request_classifier
    challenge_decider = repoze.who.classifiers:default_challenge_decider

    [identifiers]
    # plugin_name;classifier_name:.. or just plugin_name (good for any)
    plugins =
          form;browser
          auth_tkt
          basicauth

    [authenticators]
    # plugin_name;classifier_name.. or just plugin_name (good for any)
    plugins =
          htpasswd
          sqlusers

    [challengers]
    # plugin_name;classifier_name:.. or just plugin_name (good for any)
    plugins =
          form;browser
          basicauth

    [mdproviders]
    plugins =
          sqlproperties

Then you can use a constructor to create the configuration based on the .ini file, e.g.:

from repoze.who.config import WhoConfig

app = {next app in pipeline}
here = os.path.dirname(__file__)
config_file = os.path.join(here, 'who.ini')
parser = WhoConfig(here)
parser.parse(open(config_file))
middleware = PluggableAuthenticationMiddleware(app,
             parser.identifiers,
             parser.authenticators,
             parser.challengers,
             parser.mdproviders,
             parser.request_classifier,
             parser_challenge_decider,
             log_stream = sys.stdout,
             log_level = logging.DEBUG,
             )

There is a PasteScript-compatible constructor available via the egg name egg:repoze.who#config that does just this, so you can also just wire it up via a paste config file equivalently, ala:

[filter:who]
use = egg:repoze.who#config
config_file = %(here)s/etc/who.ini
log_level = debug
log_stream = stdout

You can read the documentation for more information about configuration.

- Chris


Grok sprint wrapup Sunday

Feed: Weblog
  • Jasper and Reinout finished work on traversable stuff.
  • We have ordered containers.
  • Peter and Christian Klinger worked on caching response headers.
  • The grok.url method got cleaned up.
  • In grok.require you can point to a Permission class.
  • A lot got done for Relational Database integration with SQLAlchemy, without actually needing a lot of code.
  • We have a sample implementation for a BREAD/CRUD application; will be checked into the grokapps subversion section.
  • We worked on KSS integration.
  • We talked about resource directories and the static directory.
  • Peter made a sample application and tutorial about skins and layers.
  • Philipp released grokcore.component and merged the needed changes to core grok.
  • Wim made a mockup for the Grok homepage.
  • A lot of documentation was written. Automation is done using grokdocs.
  • z3c.testsetup/grok.testing was added by Uli.
  • "Zope 2 stuff" was worked on by Godefroid and Eric. So five.grok.
  • JW and Philipp worked on martian directives. Three merges need to happen, which we will work on now. Makes it easier to write new directives and easier to get information from directives. All existing third party grokkers will then not more work anymore; we feel it is still early enough to do this, but the merge should happen sooner rather than later.
  • Christian Theuni worked on the testrunner and the zodb.


May-03

Zope3 Relational Apps - Part one ditch the ZODB


I’ve been working for the last year primarily on Zope3 relational applications, and have assembled various packages and practices for making them. I’ve recently begun publishing most of these packages as eggs to the cheeseshop, but I’ve had requests to give more examples of usage. 

The first part of the process constructing a relational app, i engaged in was to remove the zodb. The primary reason for this was to remove zodb deployment considerations ( setting up zeo,etc) so that applications can be deployed easily via mod_wsgi, or have multiple front ends without any special setup of additional components. 

The result of this was the ore.wsgiapp, originally it was just the output of a zopeproject paster template, modified to remove the ZODB startup. However, Jim Fulton refactored the zope.publisher that drives to include paste support and support for custom publications directly within it, greatly simplifying the process of setting up zope without the zodb.

Embracing WSGI

ore.wsgiapp constructs zope3 applictaions that areentirely driven by wsgi, there is no zope.conf file, only a paster config file for configuring an application and its components.

Installation

if your in a buildout just ore.wsgiapp to your eggs section.. or for the virtualenv/setuptools raw usage:

 easy_install ore.wsgiapp

Constructing an application

First we need to define an object which implements IApplication, which will be the root of our published application, useful base classes for this purpose  are in the ore.wsgiapp.app module:

  from ore.wsgiapp import app

  class MyApplication( app.Application ): pass

now if we register this object as a utility it will be the root object published by zope. we’ll do this in zcml in a separate step.

Creating an application view

you will still need to do all the basics to register/provide views of this object. for the purposes of this example, we’ll add a basic view to echo hello world:

class AppView( object ):
    """ a simple view we register for the application """ 
    def __init__( self,context, request):
        self.context = context
        self.request = request
 
    def __call__( self ):
        return "Hello World"

ZCML in Detail

so here’s a sample zcml to regiser the app as a utility, and include a basic zope3 environment.

<configure xmlns="http://namespaces.zope.org/zope"
           xmlns:browser="http://namespaces.zope.org/browser">

  <include package="zope.app.zcmlfiles" file="meta.zcml" />
  <include package="zope.publisher" />
  <include package="zope.traversing" />
  <include package="zope.app.zcmlfiles" />

  <!-- We override the default zope publisher request factory which expects a zodb -->
  <includeOverrides package="ore.wsgiapp"/>

  <!-- Application to publish -->
  <utility
     provides="ore.wsgiapp.interfaces.IApplication"
     factory="exampleapp.MyApplication"
     />

  <!-- Default View for Test Application -->
  <browser:page
      name="index.html"
      for="ore.wsgiapp.interfaces.IApplication"
      class="exampleapp.AppView"
      permission="zope.Public"
      />
</configure>

 

Paste Configuration

To use with Paste, you include a configuration section like the following:

  [app:zope]
  use = egg:ore.wsgiapp
  zcml = site.zcml

 
you can also turn on devmode here, for pdb post mortem debugging and template reloading. go ahead and save this file as debug.ini for the next step.

Running It

using a paster, its as simple as

./bin/paster debug.ini

and now we can visit our webserver to get a nice hello world  zope3 no zodb.. 
 

Application Initialization

Its often useful to defer application setup till after the application has finished loading its configuration, so that component architecture is fully configured. in order to allow for this, ore.wsgiapp generates a IWSGIApplicationCreatedEvent with the application as an attribute. we can register a subscriber for this in zcml, and it will be invoked after configuration is loaded. 

As an example we’ll use an event subscriber to:
 

  >>> from zope.app.component import site
  >>> from zope.app.container.sample import SampleContainer
  >>>

  >>> def appSetUp( app, eventevent ):
        """Initialize an application"""
        # setup a local site manager
        sm = site.LocalSiteManager( self.context )
        self.context.setSiteManager( sm )
        # add a folder
        app['news'] = SampleContainer()

 
Futures
using the zope.publisher.paste support added by jim fulton, currently ore.wsgiapp jumps through some hoops to use the existing wsgi support within zope.


Like Riding a Build Cycle... You Never Forget

Feed: ch-athens
After some months of above average slacking, I picked up on Zwiki hacking again a bit the last few days. I'm enjoying it, but it took some time to get started again. Where is the stuff again? How did we do this, that, the other thing? We also changed...


This article about the Rails comunity makes me happy to be a Zopista ..

I have never ever experienced anything like this in the Zope, Plone, Python comunity.

http://www.zedshaw.com/rants/rails_is_a_ghetto.html

"After Mongrel I couldn?t get a gang of monkeys to rape me, so forget any jobs. Sure people would contact me for their tiny little start-ups, but I?d eventually catch on that they just want to use me to implement their ideas. Their ideas were horrendously lame. I swear if someone says they?re starting a social network I?m gonna beat them with the heel of my shoe."

This is the first time it has occured to me that the relative difficulty of getting in to Zope/Plone actually makes for a higher quality of the comunity.


XML   Syndicate
» ZopeNews rss1.0
Feeds   recent Feeds
05-09 13:30 Lennart Regebro: ...
05-09 04:06 PyPI recent updat
05-08 16:41 Plone News
05-08 08:59 Itinerant Source
05-07 19:53 Repoze Notes
05-07 17:51 Stereoplex
Bookmarks   del.icio.us
» del.icio.us/tag/zope
» del.icio.us/tag/zope3
- - - - - - - - - -
del.icio.us is a collection of personal, categorized bookmarks
About   About PlanetZope
» PlanetZope aggregates
the weblogs and product
announcements of zope
related websites.
- - - - - - - - - -
7949 newsitems since june 2004
- - - - - - - - - -
It is made using Zope 2.7,
CMF 1.4.2 and Mark Pilgrim's UniversalFeedParser 4.2
- - - - - - - - - -
Contact: d2m
- - - - - - - - - -
Nearby planets
» Advogato
» Apache
» Debian
» Lisp
» Plone
» Python
» RDF
» Twisted
» XMLhack