Setting up Plone 3.2 and Repoze, hackyish



EDIT: Fixed debug.ini nuking problem - buildout was deleting this file

I wanted to run this WSGI middleware with Plone 3.2. WSGI is a Python cross-framework standard to deploy web applications (or something along the lines). Stock Plone ships with Zope’s Medusa web server which is not WSGI-compliant. Repoze is a project to make Zope WSGI compliant.

Executive summary: I got Plone 3.2 + Paster running in debug mode, hacky way.

Below are instructions how to get to the same point as I did.

Thank you for all guys on #repoze IRC channel to push me forward. I am not Repoze expert, so I hope people with better understanding make a proper buildout recipe from these ingredients. My buildout.cfg, for example, pulls in Zope 2 twice to different locations to satisfy both Ploneish and Repozeish worlds.

First create normal Plone 3.2 buildout:

paster create -t plone3_buildout repoze-plone

Just hit enter to every question.

Replace generated buildout.cfg with the attachment - you might want to edit at least admin name and password.

Then run buildout:

python2.4 bootstrap.py

bin/buildout

Then setup Paster. Copy attached paster_debug.ini to buildout folder.

Start web server. Run:

bin/paster serve paster_debug.ini

Note that paster is in debug mode - if there is an exception PDB will pop up in your terminal.

Attachments:

Share This


2 Comments

Finnish petition against Symbian



Looks like somebody has started a Finnish web petition “Please Nokia stop wasting resources on Symbian.” It claims 60% of Nokias R&D goes in Symbian related activities, but Symbian runs only in 2% phones. Due to the recession, Finland national bodies granted 500 million euros loan for Nokia to Symbian related development.

The point of the petition is: We, as the citizens of Finland, don’t want our money spend on Symbian development

Though being little radical and not totally fact based there just might be seeds of truth in there. These are mere translations from the petition page and do not reflect my personal opinions

  • Symbian architecture is ancient and doomed to die in the future
  • Symbian development takes more resources (pair of hands) than development on the competing platforms
  • Symbian is inferior compared to modern competing platforms
  • Money could be spent on environmental technology - more future proof opportunity

Symbian development makes people angry. This random Internet link tells about the attitude of Finnish engineers and engineering students towards Symbian. “Got a new summer job? Great. Symbian job? Aaaaargh…”

So if someone could please state the real facts how much Nokia spents on Symbian and is Symbian development really that inefficient?Share This


2 Comments

DataGridWidget rewrite



There’s a time to live, and a time to die When it’s time to meet the maker

Good British heavy metal.

DataGridWidget, the old work horse, has served us well. It has provided dynamic table since the early days Plone when CMSes were still made from bronze. When it was written, no good Javascript frameworks were available. It also made me the person I am now by serving as a springboard for Plone consulting business.

The problem with DataGridWidget is that it works. It’s horrideus piece of ugly code, but it works, barely. So no one has not bothered to make better one and they have lived with the sucky user interface and problems with extendability.

Until now. Prepare to buy lilys.

We needed some very advanced tabular functionality for a project which has been using DGW before. Since deadline is not yesterday, this time we shook our heads and decided to start from a scratch. This time we fix the old errors, since we have giants on whose shoulders to stand on.

I am working on ExtJS based drop-in replacement for DataGridWidget.

Features (which have been missed for years)

  • No compromises made with usability
  • Slick Windows Vista like user interface
  • String, number, select and datetime cell editors
  • Tree-like multicolumn editor as a bonus
  • JSON based hidden <input> data exchange between Javascript ja Zope
  • Cell validators
  • No accessibility support - no HTML fallback, since the interaction is so complex that it is too hard to emulate it with plain old forms
  • DataGridField storage backwards compability

It will drop good 300 KB of JS code on the page, so it might not be your cup of scripted coffee. However with a properly setup cache the user needs download this only once.

I might also add ExtJS drop in replacements to other Plone widgets (reference browser?). If you want to stick in new features now it’s the time.Share This


6 Comments

Adobe Air + Linux = installation problem



Adobe AIR could not be installed because another application is already being installed. Complete the first installation before proceeding with this one

means:

Please close Firefox and then rerun the installer. Not very flattering installation experience if the users default to Googling for an error message (who would not have Firefox running after downloading Adobe Air installer?). This very descriptive error message fails to tell what the user actually has to do to correct the error. Big screw up from Adobe, though Air is good otherwise.Share This


1 Comment

DistutilsError: Setup script exited with error: Setup script exited with error



EDIT: Fixed the problem with quotation marks in the copy-paste.

The following errors appears with buildout when developing your products now and then.

 File "/usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/setuptools/command/easy_install.py", line 655, in install_eggs return self.build_and_install(setup_script, setup_base) File "/usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/setuptools/command/easy_install.py", line 930, in build_and_install self.run_setup(setup_script, setup_base, args) File "/usr/lib/python2.4/site-packages/setuptools-0.6c9-py2.4.egg/setuptools/command/easy_install.py", line 921, in run_setup raise DistutilsError("Setup script exited with %s" % (v.args[0],)) distutils.errors.DistutilsError: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Setup script exited with error: Numerical result out of range While: Installing. Processing develop directory '/srv/plone/twinapex.fi/src/collective.easytemplate'

The error message is not very helpful (as they never are with setuptools), so I never solved the cause. I assume it is somehow related to egg dependency order. Others have been having the same problem. But here is the temporary fix. Assuming src is your develop egg folder (copy-pasting quotation marks to terminal didn’t work):

find ./src -iname "*.egg-info" | xargs rm -rf

egg-info folders will be regenerated during the next buildout without issues.Share This


Leave a Comment

Troubleshooting DD-wrt v24, PPTP and Vista



I have trouble to get Microsoft Windows Vista Home Premium SP1 to connect to my DD-WRT v24 router PPTP VPN (acronym overload).

Solution:

Log in to your DD-WRT via SSH, check that PPTP service is running using netstat command. netstat -l shows all listened connections. Port 1723 should be lisetd. If not, try reenable PPTP Server in the router settings and reboot.

tcp        0      0 0.0.0.0:1723            0.0.0.0:*               LISTEN

After this, check that on the PPTP options page Properties -> Security ->  Require data encryption (disconnect if none) is not enabled. I am pretty sure the connection is encrypted, but for some reason Vista didn’t think so.

Also, make sure that your other network end is able to route IPv4 GRE prot0col. Some cheap equipment or bad ISPs might not able to do this.Share This


1 Comment

pygame goes mobile



Pygame, the easiest way to make computer games in the world, has just reached your pocket.

Check our announcement at

http://discussion.forum.nokia.com/forum/showthread.php?t=152969Share This


Leave a Comment

Planetmobile.us updates



Removed Forum Nokia announcements, since there are too many of them nowadays and they were flooding the blog making it useless.

Added few more blogs

  • David Wood
  • Andrew Grill
  • Androinica
  • Mobile Internet As It Is
  • Mobispray
  • Symbian Freak

Now our planet starts to feel useful. I’d hope to see more non-Symbian content. Please suggest some!Share This


Leave a Comment

Python-like urlparser module for Javascript



I had to deconstruct and reconstruct URLs from pieces when doing advanced Javascripting for Plone.

I found this nice library from Denis Laprise. However, it had a bug with fragment extractor and lacked reconstruction possibilies. So I decided to make a new version.

Download urlparse.js version 0.2. thank you :)

Couple of examples:

var p = new Poly9.URLParser('http://user:password@poly9.com/pathname?arguments=1#fragment');
p.getHost() == 'poly9.com';
p.getProtocol() == 'http';
p.getPathname() == '/pathname';
p.getQuerystring() == 'arguments=1';
p.getFragment() == 'fragment';
p.getUsername() == 'user';
p.getPassword() == 'password';

var p = new Poly9.URLParser("http://localhost:8080/path);

p.setQuerystring("foo=bar");
p.setFragment("anchor");
p.setPort(7070);

var url = p.getURL() // http://localhost:7070/path?foo=bar#anchor

Share This


Leave a Comment

How do you prefer your documentation?



Lately there have been three long email chains related to Plone development documentation here, here and here (total ~100 messages). This little post tries to summarize the current discussion.

I think the dicussion is mostly fueled by third party developers’ frustration with the current development documentation situation. Developing for Plone is difficult, since finding references, how tos and examples for those little things you need is very hard. This is a turn off for many developers who would otherwise use this great system - high developer learning curve and gaps in the documentation makes the system useless.

Points everyone agree are

  • Plone development documentation is not good
  • Sphinx is good for API documentation - already happening
  • Contributors are needed

Points discussed are

  • Should developer documentation be more open ended (Wiki-like). This covers
    • Developer manual
    • How tos and other misc. references
    • API documentation
  • Mostly, it is not about generic end user, admin or system integrator or getting started documentation (here, here)

Pro wiki-like documentation stances

  • It should be more open ended (here, here, here)
  • It’s better to have something messy instead of nothing at all - the current approval process discourages contribution (here)

Con wiki stances

  • It should not be open ended, since this results to messy documentation (here, here)
  • There should be less plone.org documents (here)
  • Wikis are bad (here)
  • Incomplete wikis are discouraging (here)

Let’s wait and see where this goes.Share This


5 Comments

Next Page →

Copyright © Red Innovation Ltd. 2009 All Rights Reserved. | Log in | XHTML
Close
E-mail It