There are several technologies (in the Python world) to have isolated environments for projects. In this post I will describe how we use Virtualenv, Buildout and Docker for a project I’m working on at Fox-IT.
When I was experimenting with an SVG sprite to replace my current icon font, suddenly some of the icons disappeared without a clear reason. It worked fine when I accessed the demo page via the file URI scheme, but as soon as I used an HTTP server, some of them did not show up.
To introduce a coworker to our project and Django in general, I suggested that he would try PyCharm, a Python IDE. One of the (many) nice things of PyCharm is that you can easily jump to the place where something is declared—ideal for exploring a project.
When I started on a project it seemed to make sense to put a part of the project in a separate Git repository. In hindsight that wasn’t such a smart move. Here’s how I fixed it.
A site I’m working on uses
Font Awesome. Font Awesome is an iconic font
designed for use with
Twitter’s Bootstrap and
currently (at version 4.0.0) includes 370 icons. It is an easy to use and
nice icon font. But I needed
PNG files of the icons so I could use
the same icons in a different system.
Currently I’m working on a project where I have the staging environment running on a virtual machine in a vlan. However, the virtual machine cannot directly access the internet for security reasons. This is inconvenient when I want to e.g. run a buildout to update the project.
This week, on June 11th, Twitter retired version 1 of their API. As a
result, the Twitter portlets of some of our customers stopped
working. They are all using
collective.twitterportlet so we created a
quick (and slightly dirty?) fix to get them up and running again:
A note to myself on how to get a quick insight in the content in a ZODB.
For about a month I have served this website using the CloudFlare free plan. This article describes what I observed.
On Wednesday the 12th of December, Goldmund, Wyldebeast & Wunderliebe organised a Diazo workshop. Douwe van der Meij and Kim Chee Leong introduced us to the wonderful world of theming Plone the easy way (my words, not theirs). Since this workshop took a full day, this is not a complete summary but a more an extended version of the notes I took during the day.
In this article I share the podcasts listen to on my daily commute.
Kim shows us a collection of tools that can be useful during development.
While working on a client project, I created an (Archetypes based)
content type with a text field. After adding a custom view as the
default view, I got an
AttributeError when I tried to add a new
For years web development was quite predictable. The resolution of the average screen slowly but steadily increased, bandwidth became less of an issue and everything was good. Then smartphones became mainstream. Suddenly we have to make sure our websites are also accessible on small screens. And bandwidth may also be limited to a few kilobytes per second. In other words: new challenges. But how are we responding to them?
Are you using a jQuery plugin, for instance jQuery UI,
to spice up the Django admin site? Then you might get either an error like “
foo is not a function” (Firebug) or “
Object ... has no method foo” (Chrome Developer Tools).
Are you confused because
foo should be defined in the plugin? Don’t worry, the
solution is simple.
A lightning talk by Thijs Jonkman at the Dutch Plone User Day once again brought Compass to my attention. I’ve read about it on other occasions, but I never actually tried it. But Thijs really made me want to try it for myself.
This article is a short example of how to use a list as a value of a dict when using plone.app.registry. Perhaps a similar example is already in the docs, but I could not find it when I was looking for it. And since it took me some trial and error to get it right, I figured I could just as well post my solution.
A tale of how I learned about PostgreSQL sequence generators the hard way.
Today I wanted to set the workflow for the content type File to
After migrating a Plone 2.5 site to Plone 3, I got a
UnicodeEncodeError when viewing the site.
One of the things that was still on my wish list for this site, was a proper search. In two articles I will explain how I’ve done this. The previous article described why I picked Djapian. This article focusses on some of the technical aspects of my setup.
One of the things that was still on my wish list for this site, was a proper search. In two articles I will explain how I’ve done this. The next article will describe the way I have currently set things up. This article will primarily focus on the journey I made to come to my choice (Djapian).
Initially I was a bit sceptic about Fabric. After all, I’m already using buildout to manage projects. “How much better can it get?” After watching the video of the Django Deployment Workshop (held by Jacob Kaplan-Moss at PyCon 2010 Atlanta), I finally decided to see for myself what Fabric is all about.
After a bit of experimentation I’ve succeeded in moving an existing
Plone 3.3.5 from the normal FileStorage storage (in other words a ZODB
Data.fs file) to RelStorage using PostgreSQL. This is a blog post
about what I needed to change in the buildout configuration and which
resources I used.
Yesterday I was experimenting with RelStorage and ran into an error:
UnboundLocalError: local variable 'blob_storage' referenced before assignment.”
When migrating from Plone to Django, I had problems with editing
weblog entries with a dot in the url. Apparently Django doesn’t allow
dots in a
SlugField. Here’s how I solved it.
While updating a buildout, Pound would not compile anymore. “All” I did was update it from version 2.4.4 to 2.5.
In April Packt published Django 1.1 Testing and Debugging by Karen M. Tracey. After reading it I figured I might as well write a review.
The summary: as of today, you no longer need to checkout
enablesettrace from the Zope Subversion repository. You can just use
the Products.enablesettrace egg to debug your restricted Python code.
On 19 February I held a presentation for my colleagues about distributed version control systems (DVCS). My main goal was to inform them on what I think is the next logical step in source control.
Recently I read some articles about web designers. This got me thinking about the qualities I think you need to be a good designer and about the different ways a design can be made.
Today I read two articles about the usefulness of unit testing. Here are my thoughts.
I frequently have to send emails from web applications. But before I deploy to a production environment, I want to make sure the mechanism works and the right mails are constructed. Here’s two ways to do that.
A couple of years ago, Joel Spolsky wrote “The Joel Test”. Let’s see how Zest Software scores…