apt-packages:
build-essential
python-setuptools
python-pip
python-imaging
#-*- coding: utf-8 -*- | |
# Work in progress. The South part does not work correctly yet! | |
import base64 | |
from django.db import models | |
# Stolen from http://djangosnippets.org/snippets/1669/ | |
class Base64Field(models.TextField): | |
def contribute_to_class(self, cls, name): |
#-*- coding: utf-8 -*- | |
import zbar | |
from PIL import Image | |
def read_barcode(path): | |
scanner = zbar.ImageScanner() | |
scanner.parse_config('enable') | |
pil = Image.open(image).convert('L') | |
width, height = pil.size | |
raw = pil.tostring() |
#-*- coding: utf-8 -*- | |
__version_info__ = { | |
'major': 0, | |
'minor': 1, | |
'micro': 0, | |
'releaselevel': 'alpha', | |
'serial': 1 | |
} | |
def get_version(short=False): |
#-*- coding: utf-8 -*- | |
""" | |
Provides an easy way to turn any ascii string into a funky unicode character massacre. | |
Example usage: | |
>>> from unicodefy import unicodefy | |
>>> print unicodefy(u'We are not ASCII') | |
Wë ãrè ñót ÅŠÇÎÌ | |
""" |
###################### | |
# Windows | |
###################### | |
# Windows image file caches | |
Thumbs.db | |
# Folder config file | |
Desktop.ini |
Drift is an always-already versioned, cloud-backed text editor. You can use it to take notes, and save them in the GitHub cloud.
Your gists are always saved locally, and any changes you make will get pushed to GitHub's servers.
To name a gist, touch its name in the toolbar.
You can use the share button at the top-right to copy a link to one of your gists, or view it on the web in Safari.
""" | |
Just a quick hack to collect all "media" directories in INSTALLED_APPS instead | |
of only the "static" directories. | |
add this to your settings: | |
STATICFILES_FINDERS = ( | |
"django.contrib.staticfiles.finders.FileSystemFinder", | |
"django.contrib.staticfiles.finders.AppDirectoriesFinder", | |
"myproject.media_staticfiles_finder.AppDirectoriesFinderAsMedia", |