10. September 2009 | keine Kommentare
In this little tutorial I will show you how to use the Python web framework Pylons and the Mako template library with the cross-browser JavaScript framework Ext JS.
I will explain how to set up a complex layout (this means an Ext.Viewport) and how to dynamically load its contents and further functionality.
First of all, you need to set up Pylons and a create a new project. Let’s name it “PylonsAndExt”. During setup, mako needs to be selected as our template engine. We do not require SQLAlchemy support…
THEMEN: (Web) Development, Ext JS, Pylons Web Framework
4. September 2009 | keine Kommentare
When I set up Pylons today in a virtual isolated Python environment on my Windows machine, I had a little fight with psycopg2 (which usually allows me to connect to my PostgreSQL database). At first, everytime I tried to “easy_install psycopg2″, I ended up with the error message “unable to find vcvarsall.bat”.
Luckily I found a solution to get the “unable to find vcvarsall.bat” problem fixed.
But unfortunately there was another error when I wanted paster to serve:
File “C:\Python26\lib\site-packages\psycopg2\__init__.py”,
line 60, in <module>
from _psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
ImportError: DLL load failed: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
Of course, reinstallation did not fix the problem. I thought the whole challenge might be caused by my virtual environment, because Jason Erickson (who publishes the psycopg Windows binaries) mentioned problems that would occur when using psycopg with virtual environments in his blog. But nothing I tried improved my situation.
Solution: Use an older version (2.0.10) of psycopg2!
Later on I found a post in Google Groups, where someone had a similar problem with psycopg2 under Windows. He figured out that there was something wrong with the build of psycopg2 (version 2.0.12) and that simply using an older version (for example 2.0.10) worked fine… That made my day!
THEMEN: (Web) Development, Pylons Web Framework
26. April 2009 | Ein Kommentar
As described in one of my previous blog posts, I’ve got the chance to introduce Pylons to my web engineering class as part of my studies at the University of Western Sydney. Thus this blog post gives an overview of the Pylons web framework.
Pylons is an open source web framework written in Python. It uses the model view controller architecture, follows the approach of convention over configuration and puts emphasis on loose coupling and clean separation. This helps developers to quickly create sophisticated web applications without hiding what is really going on.1 In the following paper I will describe the way web applications have been developed in the past and what changes modern web frameworks have led to, especially Pylons.
THEMEN: (Web) Development, Pylons Web Framework
9. April 2009 | Ein Kommentar
During my studies at UWS I’ve got the chance to introduce Pylons to our web engineering class. I plan to finish a short report, describing the advantages and the architecture of Pylons, until April 17th. The report will be available here after it has been marked. The topics the report will cover are described in a presentation I made with Google Docs:
THEMEN: (Web) Development, Pylons Web Framework