Daveoncode - daveoncode.com - DaveOnCode

Latest News:

Check Django messages (quantity and type) in unit tests 2 Aug 2013 | 03:53 pm

Ok, in this short (but I hope very helpful post), I’m gonna show how to check messages (Django messages framework) in your tests. I don’t know if there is a better or “normalized” way to do this, but...

Generate random dates in python using datetime and random modules 20 May 2013 | 03:57 am

In order to insert fake users into my database for test purposes (see the previous post), I forget to generate a random birth date but I’ve currently solved the problem using the two modules datetime ...

Bulk users creation and fixtures loading in Django 16 May 2013 | 02:38 am

Are you trying to figure out a simple and effective way to create hundreds or thousands of fake users in order to test your Django application? If so, I’m gonna explain how I did it, and I hope to sav...

Dynamic list filtering with Python 22 Feb 2013 | 04:37 am

Python is AMAZING! I was defining a field for a Django model which represents minutes and I thought to allow the selection of ranges of 5 minutes only (ie: 5, 10, 15…), this can be accomplished by pas...

Solving launchctl load “nothing found to load” error 1 Feb 2013 | 09:25 pm

Today I was playing with OSX launchctl command, in order to autoload a program using a simple and human-readable XML file (.plist). Initially my command (sudo launchtl load /path/to/myplist.plist) was...

Customize different Eclipse installations with custom name and application logo 30 Jan 2013 | 09:57 pm

I have two separated installations of Eclipse on my mac, one is configured for Java development and one for Python. Technically I could use only one installation for both by installing all the require...

Dates and time difference in Python 6 Jan 2013 | 06:46 pm

The problem: you have to calculate difference between dates (days, hours, minutes, seconds or whatever) using Python. Solution: import and use datetime and timedelta like the example below: As you can...

Enable custom submit button styling in Safari mobile 3 Jan 2013 | 04:50 pm

If you want to style a form submit button with custom size and border radius you have to “nullify” the default Safari mobile style, since differently it will be somehow “unrewritable”. I discovered th...

Pongo: when Object Oriented PHP meets MongoDB! 22 Dec 2012 | 09:20 pm

I’m constantly expanding my technology knowledge and my latest discovery is MongoDB! I really love it and I’m gonna use it for a project I’m developing with another geek. The adopted language will be ...

Finally I released JXT! 9 Dec 2012 | 10:46 pm

I spent several months behind my project, but finally a first beta it’s now available! I have nothing to say here that you wont found on the site, therefore go here: www.jxtdev.com and discover what J...

Recently parsed news:

Recent searches: