Fri 13 April 2012
For a mobile project I required a background worker which sents an email
with 300 generated QR codes zipped together as attachment. This costs
quite some time so we need a background worker to execute this task.
I wanted to achieve the following result:
- When the user wants to generate …
Continue reading »
Thu 23 February 2012
To make my life easier I made a simple decorator which checks if the
parameters are present in the request.POST or request.GET and returns a
response if they are not.
It accepts a list of parameters in string format and will loop through
each parameter to check if …
Continue reading »
Wed 22 February 2012
Just a small code snippet I use when I need to return json, comments are
welcomed.
from django.http import HttpResponse
from django.utils import simplejson as json
def json_response(dict_to_convert_to_json):
return HttpResponse(json.dumps(dict_to_convert_to_json),
mimetype="application/json")
To use it in your view you just do it this …
Continue reading »