Django redirects with regular expressions

sep 2, 2013 - Alex - regex - django - python - Development - Django

We've been doing quite a few projects lately where old incoming links need redirecting to new pages (both for visitors and the much sought-after Google juice). In such projects SEO is mostly tacked-on as an afterthought and often neglected, however giving your users the tools to set this up themselves is always appreciated. The default redirects app in Django works pretty well for users, but ...

Read More

Twitter API 1.0 goes 410 Gone, time to upgrade to 1.1

jun 15, 2013 - Alex - twitter - python - Software

After quite a few warnings Twitter finally pulled the plug on API 1.0 last Tuesday, leading to quite a few Twitter applications to break. Their new API has been around for some time, but as OAuth authentication for all endpoints to the new API is required (combined with stringent rate-limiting and no longer being able to get RSS, Atom or XML responses) transitioning to it ...

Read More

MySQL AES_ENCRYPT in Python

nov 15, 2012 - Joeri - encryption - aes - mysql - python - Development - Software

MySQL features a function called AES_ENCRYPT(str, keystr). In this blogpost, we show you how to emulate that same function in Python.

Read More

Using gp.vcsdevelop for vcs dependencies in zc.buildout

jun 30, 2010 - Remco - pip - vcs - python - zc.buildout - Software

When using gp.vcsdevelop bear in mind that you'll explicitly have to add the egg installed by gp.vcsdevelop (through using pip) to the buildout eggs.

For example if you want to add grappelli revision 1072 from googlecode's svn and django-nose revision bda1f7820223f913e09d from github to your django project, do it like so:

Read More

Using Fabric to update a remote svn checkout with ssh public key authentication

jul 14, 2009 - Remco - publickey - deployment - python - fabric - django - ssh - Development

For our subversion repositories we only allow users to connect through ssh public key login. We are switching towards using Fabric for doing automated deployments (in combination with zc.buildout, which we already use). Unfortunately it seems that both Fabric and paramiko, the python library Fabric uses for making ssh connections, don't support the ForwardAgent option in ~/.ssh/config which allows you to forward your ssh-agent to ...

Read More

Using mysql load data infile with django

apr 27, 2009 - Remco - django - import - mysql - python - Development

To import large amounts of CSV data from a file into a MySQL database you can use the LOAD DATA [LOCAL] INFILE command. There are some caveats using this command having to do with security. In order for LOAD DATA to work you will have to enable the command on both the server and client. To do this for the server, you can edit your ...

Read More

Latest Tweets