Patrick Arminio's blog


Fix "ValueError: unknown locale: UTF-8" under Mac OS X 10.7 - Lion

Today I was trying the new Django 1.4 Beta 1 and when I run the syncdb command I got this error: (app)patrick@app$ python manage.py syncdb Creating tables ... Creating table auth_permission Creating table auth_group_permissions Creating table auth_group Creating

Continue Reading

[Plugin] jQuery Holed Div

Recently I needed to create a holed div, like this: I haven't found any good solution to create a holed div without using images, so I tried to use canvas as a background and it worked nicely. Anyway I wanted to share my result to

Continue Reading

[Project] Arduino and Canon EOS 400d

This is my last project, an intervalometer for my Canon EOS 400d created with arduino. I created it because i need to create some time lapse video for the coming soon bisaccia.info's web tv. Here are two videos: The "Backstage": A sample time lapse:

Continue Reading

Tip - Dynamic Path For FileField

In a recent project I needed to save a file to a dynamic directory. My model was something like this: from django.db import models class MyDoc(models.Model): name = models.CharField() document = models.FileField(upload_to='uploads/documents') with this code each document will

Continue Reading

Adding additional views to django admin

Today I wanna show you a simple way to add an additional view to the admin site. Imagine that you want to create a view to review a model, something like send an email to the site owner with your thoughs (or your changes) about

Continue Reading