Deprecated - see https://github.com/gregplaysguitar/django-simple-search
Web fonts may be the best thing to happen to web design in years, but that doesn't mean there aren't some tricky issues to overcome. One of the most annoying things is dealing with what's become known as the FOUT or 'Flash of Unstyled Text'. It's what happens in some browsers while waiting for fonts to download.
Typekit is introducing Font Events to put you back in control when using web
div.customselect { | |
position: relative; | |
display: block; | |
width: 240px; | |
-moz-border-radius: 5px; | |
-webkit-border-radius: 5px; | |
border-radius: 5px; | |
z-index: 100; | |
background: #F2FFDC; | |
color: #333; |
$(document).unload(function(){ | |
google.maps.Unload(); | |
}); | |
$(document).ready(function(){ | |
$("input.location_picker").each(function (i) { | |
var me = $(this), | |
mapDiv = $('<div>').insertBefore(me).addClass('location_picker_map'); | |
me.css('display','none'); |
Simple django management command to automate the process of renaming an existing table, recreating via syncdb, and inserting the old data into the new table. Currently does not handle field renames - will eat your data if you try.
To install, save this file into an installed django app's management/commands/ directory, eg
myapp/management/commands/simplemigration.py
Run the command from the command line as follows
python manage.py simplemigration APPNAME.MODELNAME
*.pyc | |
conf.py |
#!/usr/bin/python | |
from sorl.thumbnail.conf import settings | |
from sorl.thumbnail.base import ThumbnailBackend | |
FORMAT_DICT = { | |
'png': 'PNG', | |
'jpeg': 'JPEG', | |
'jpg': 'JPEG', |
from django.contrib import admin | |
from django.contrib.auth.models import User | |
from django.contrib.auth.admin import UserAdmin | |
from django.forms.models import inlineformset_factory | |
from django import forms | |
from django.contrib.auth.forms import UserCreationForm, UserChangeForm | |
def upgrade_user_admin(UserProfile=None, unique_email=False, | |
list_display=None): |
/* | |
jquery.aggregate.js by Greg Brown 2011. See | |
http://gregbrown.co.nz/code/jquery-aggregate/ for details. | |
License information: http://gregbrown.co.nz/code/license/ | |
*/ | |
/* |
from django import http | |
from django.utils.http import urlquote | |
from django import urls | |
from django.conf import settings | |
from django.utils.deprecation import MiddlewareMixin | |
class AppendOrRemoveSlashMiddleware(MiddlewareMixin): | |
"""Like django's built in APPEND_SLASH functionality, but also works in | |
reverse. Eg. will remove the slash if a slash-appended url won't resolve, |