Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Erik Evenson ErikEvenson

🎯
Focusing
Block or report user

Report or block ErikEvenson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@percyperez
percyperez / create_api_key.py
Created Jun 4, 2013
Signal function to auto-create ApiKey objects when using tastypie ApiKeyAuthentication.
View create_api_key.py
# models.py
# Work around the ImportError: cannot import name create_api_key
# Issue https://github.com/toastdriven/django-tastypie/issues/937
class User(AbstractUser):
field1
...
@receiver(post_save, sender=User)
def create_user_api_key(sender, **kwargs):
@gerardo
gerardo / field.html
Created Oct 15, 2012
Table-based formset rendering
View field.html
{% load crispy_forms_field %}
{% if field.is_hidden %}
{{ field }}
{% else %}
{% crispy_field field %}
{% endif %}
@dhoerl
dhoerl / KeychainItemWrapper.h
Last active Jun 14, 2019
KeychainItemWrapper ARCified. Added the ability to manage a dictionary in place of just a string - the #define PASSWORD_USES_DATA in the .m file switches the mode.
View KeychainItemWrapper.h
/*
File: KeychainItemWrapper.h
Abstract:
Objective-C wrapper for accessing a single keychain item.
Version: 1.2 - ARCified
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of
You can’t perform that action at this time.