How to implement modal popup django forms with bootstrap

django forms bootstrap

UPDATE 11/18/2015

I wrote another article like this, but newer, just tested and with support for both bootstrap 3 and 4-alpha, check it out:


Sometimes could be a good idea to have the user provide all the needed information without living the "index" or "main" page of our web application. In other terms, sometimes could be a good idea to have some forms appear on a layer, a modal ...

read the full post

Check if user belongs to a group in django templates

django tips

Generally when implementing some "authentication logic" inside a django template it's enough to check if a user has some permissions, and in such cases you can use the variable perms, which is available if (from django site):

Technically, these variables are only made available in the template context if you use RequestContext and your "django.contrib.auth.context_processors.auth", which is default. For more, see the RequestContext docs.

But could happen that you need to check if a user belongs ...

read the full post

Drag and drop touch compatible with mootools

drag&drop javascript mobile mootools

Drag and drop is a nice feature which often can increase the usability of our web applications. Mootools has a good support for drag and drop in the more package, which actually works well for desktop environments.

But unfortunately we are in 2014, and now targeting our apps for desktop only is something which should be avoided except if we are sure no one will use them with mobile or tablets.

So the problem is, how to extend the drag ...

read the full post

AWR - abidibo's web radio software

awr gtk python software

Today I'll introduce you AWR, my first python/GTK software which actually acts as an interface to mplayer in order to manage web radio streams.

AWR is a free, open source, python project, the code is hosted on github, feel free to use, fork, contribute and so on...


© 2013 Stefano Contini - MIT License (http://opensource.org/licenses/MIT).


  • The web radios appearing in the interface inside genre-tabs are configurable through a simple json file, you can add ...

read the full post

Wordevents boosted up

javascript mootools wordevents

Wordevents is a mootools plugin which allows to listen for word typed events, and execute given callbacks if the word belongs to a given dictionary. Till release 0.1.x it the dictionary could be only filled with strings, which represent the words to listen for. Now things are different.


Wordevents accepts as an option a function which says if the typed character should be considered or not, allowing to consider only a certain set of characters (i.e ...

read the full post

About responsive tables

css3 html5 responsive-design

2013 was the year of responsive design. And 2014 too.

There are many html5/css3 frameworks which provide components, css classes, js libraries etc... that you can use to speed up the process of creating a good and responsive web interface.

There is a sort of vacuum indeed, when dealing with html tables. Do not get me wrong, this is not a fault of the frontend frameworks, but it is an intrinsic problem, due to the nature of tables. The ...

read the full post

How to get the mouseovered half of an element

events javascript

Today I'll write a very simple and short post about a very simple function that you can use to retrieve in which half (left/right) of an element the mouse is moving towards. The function is written in vanilla javascript, no frameworks are involved.

Given the element which captures the event and the event itself the function return the string 'left' or 'right' depending on the cursor position over the element.

 * Gets the mouseovered half of an element

read the full post

Singleton, the PHP way

patterns php programming singleton

I realized that even if the great part of my work consists in programming PHP stuff, I rarely write about PHP in my posts, maybe because I really don't like it?

But today I'll write about a way to implement the singleton pattern with PHP.

This is quite an easy job making use of PHP 5.3.0, thanks to the "Late Static Binding" feature. In particular we'll use the get_called_class method and the static keyword. Notice that ...

read the full post

Your Smartwatch Loves Tasker!

Your Smartwatch Loves Tasker!

Now available for purchase!