By Bart | maart 25, 2016
By Bart | december 14, 2015
By Bart | november 21, 2015
By Bart | oktober 22, 2014
By Bart | september 15, 2014
De laatste maanden kon ik mijn blog niet updaten, want qTranslate blokkeerde de updates met de melding dat mijn site niet meer zou werken als ik het toch deed. Jammer genoeg lijkt de ontwikkelaar de de plugin er geen zin of tijd meer in te hebben om het project verder te bouwen. Gelukkig is het allemaal open-source en hebben een aantal dappere zielen de code geforkt en een nieuwe plugin gestart, mqTranslate. Hiermee kon ik alle updates draaien en nu is due WordPress 4.0 geïnstalleerd! De update ging zonder problemen en de instellingen zijn perfect overgenomen.
Bedankt, Qian Qin voor een fantastische plugin, en bedankt mqTranslate team voor het voortzetten ervan!
By Bart | april 24, 2014
Started working with Python, which is extremely easy and a joy to work in. It also has great libraries and tools you can use. So, also started using CherryPy to power the XML API I am working on. While debugging it throws out a lot of messages on stdout, of which the access messages I don’t want. Googling and playing around I found this quick way to disable the access logging in stdout:
import logging import cherrypy cherrypy.log.screen = False cherrypy.log.error_file = "" cherrypy.log.error_log.addHandler(logging.StreamHandler())
By Bart | december 14, 2013
In part 1 we defined our limits and the requirements needed to replace PHP. We gave Python a first look and found out it is quite easy to use it in Apache. To get a good feeling of what Python can do and how to build a Real World site, I decided to use our Beers website as a case study. It is a simple website where we post beers we tasted around the world, including photos and reviews. It works with a simple database and administration possibilities. The goal is to re-implement the site in Python and transfer all existing data into it.
Researching Python and web applications quickly puts you on the road of web application frameworks, something I really haven’t used in PHP. Maybe that’s one of the reason of all my bad PHP habits. The de facto Python framework standard seems to be Django. And a nice warm bath it is. It installs like a breeze (as simple as an
apt-get install python-django) and has great documentation. I am on part three of its good tutorial now and I am getting a feeling of the joy of using both Python and the Django framework. There are a few things to consider though:
- You cannot just start churning out code and design along the way like you can in PHP. This is of course a Good Thing, but can be a little of a turnoff if you want to just quickly hack something together.
- A lot of stuff is happening “under the hood” and in the library. I still have to get a good feeling how it all fits together.
I have used CakePHP before as a framework in PHP, but it didn’t give me the same feeling as Django does. This can of course be because of me. But after running through the tutorial and trying to wrap my head around its workings, Django makes me want to continue with it, CakePHP made me want to put it away. Django gives me the feeling I am still in control, because it hides all the standard stuff behind (highly customisable) admin pages. The actual web application has to be written completely by you. Django includes full MVC support (database connections are seamless, no need to write any SQL) and a template system. Using the
manage.py shell you can even load and edit the data in real time. In short, Python with Django lets you create apps, not write the same stuff over and over again. It is not really about the language yet, I hope I can get to that in the next part.
By Bart | december 7, 2013
By Bart | september 24, 2013
By Bart | augustus 19, 2013
« Voorgaande Artikelen