23rd September 2016
13th December 2015
20th July 2015
Over time I realized that waiting more than 15 minutes for my entire test suite to complete was very, very wrong. I've neglected spending time on fine tuning end eningeering tests and now each time I had to run some tests I found myself annoyed, bored, distracted. Quite a productivity killer
.In this post I'll share how I solved this problem and achieved a drastic speed up of an open source django project.Hopefully you'll be able to replicate this setup and enjoy the same benefits I'm enjoying now!
continue reading "How to speed up tests with Django and PostgreSQL"
9th February 2012
I wanted to implement this functionality in my django projects for some time now and I finally had the chance to work on a project that has this requirement in the specification.
This is an attempt to a django reusable app that aims to be functional but flexible. It's based on django-tagging-autocomplete and depends on django-tagging.
Customizable maximum tags number
Costomizable max length of each tag
Customizable minimum amount of letters before the autocompletition starts
Aims to be flexible (help me if you want)
continue reading "Django Tagging Autocomplete Tag-It"
21st October 2011
I am very happy to announce (with a bit of delay) that next sunday i'll present Nodeshot, an open source project in which I started contributing this summer, at the Open Terni Festival 2011, a festival about the open source world organized in Terni, Italy...
continue reading "Presenting Nodeshot at Open Terni Festival 2011"
27th October 2010
If you are using Django 1.2 and you tried installing Django Tagging Autocomplete you will have noticed that the autocompletition won't work unless you oad a second copy of jQuery. Since I find that a very crappy solution I found a solution that works better for me and I want to share it with you.
continue reading "Tagging Autocomplete to work with Django 1.2"
25th October 2010
If like me you are using Django StaticGenerator to speed up your blog you should have noticed that your comments won't work anymore, since StaticGenerator will cache also the fields used by the django comment app to block spam and CSRF attacks.
In this post I'll share with you a quick and easy solution with jQuery.
continue reading "How to get comments working with Django StaticGenerator"
3rd October 2010
If you use Django you will surely know that its url routing is quite strict regarding the prettiness of its URLS but there are still cases in we need to handle query string parameters, like when dealing with external services that return a URL like: callback?verification_code=088145235648fs689sa56h&userid=854 . What to do in this case?
continue reading "Django: How to Retrieve Query String Parameters"
30th September 2010
The standard Django FileFields assume you want to upload a file in a subdirectory of MEDIA_ROOT, what if you want to upload the file in a private directory above the web root, not accessible via http?
How can you serve the files then?
continue reading "Django: Private File Upload and Serving"
24th September 2010
Immagine that you need to add the possibility to upload a PDF or Zip file in the django admin, but you want to be sure your client will upload only these two filetypes and not other ones.
You might also need the same functionality in the frontend, so why not use "ModelForm" and have just one validation for both applications (admin and frontend)?
In this short post I'll share with you my simple solution.
continue reading "Django: FileField with ContentType and File Size Validation"
3rd May 2010
I noticed StaticGenerator while I was looking for some cache invalidation solution and I understood that would have been just perfect for my web-site, but the instructions on its web-site show only how to make it work with Nginx configured as frontend server. What if you want to stick on Apache? Read the rest to know...
continue reading "How to setup StaticGenerator with Apache + mod_wsgi"