This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
Name=rxvt | |
Comment=Terminal emulator | |
TryExec=rxvt | |
Exec=rxvt | |
Icon=terminal | |
Type=Application | |
Categories=Utility;TerminalEmulator;System; | |
StartupNotify=true | |
X-Ayatana-Desktop-Shortcuts=NewWindow; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RadioTableRenderer(RadioSelect.renderer): | |
def __iter__(self): | |
choicelist = "" | |
inputlist = "" | |
for i, choice in enumerate(self.choices): | |
id = '%s' % (self.attrs['id'] if 'id' in self.attrs else '') | |
#label_for = ' for="%s"' % id if id else '' | |
choicelist = choicelist +"<th>"+choice[1]+"</th>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from django.utils import simplejson | |
from django.contrib.auth.models import User | |
from django.core.validators import email_re | |
from dajaxice.decorators import dajaxice_register | |
from emailconfirmation.models import EmailAddress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth.models import User | |
from django.db.models.signals import post_save | |
from django.dispatch import receiver | |
@receiver(post_save, sender=User) | |
def user_created_callback(sender, instance, created, **kwargs): | |
if created: | |
# do stuff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Like the Dajax full form example, but for a form in a formset: http://dajaxproject.com/fullform/ | |
# | |
# Javascript | |
# get the css id which surrounds the form you need to variable myformcssid | |
# var data = $(myformcssid + ' *').serializeObject(); # use serialize() if not jQuery | |
# id for the instance to be modified | |
# var mymodelid = "{{ form.instance.id }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTML5 Django DateTimeWidget | |
See rest of the code and instructions at: | |
http://copiesofcopies.org/webl/ ( http://copiesofcopies.org/webl/2010/04/26/a-better-datetime-widget-for-django/ ) | |
For localized times, use with django-timezones: | |
from timezones.forms import LocalizedDateTimeField | |
date_field = LocalizedDateTimeField( |