Skip to content

Instantly share code, notes, and snippets.

View jawache's full-sized avatar

Asim Hussain jawache

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.2.4.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="http://www.parsecdn.com/js/parse-latest.js"></script>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.2.4.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="http://www.parsecdn.com/js/parse-latest.js"></script>
</head>
<body>
class SignalModel(models.Model):
"""A Model mixin class that lets you put your signal handler methods back into your Model class."""
@classmethod
def _sig_pre_delete(cls, instance, *args, **kwargs):
"""dispatch the pre_delete method to a regular instance method. """
return instance.sig_pre_delete(*args, **kwargs)
@classmethod
def _sig_post_delete(cls, instance, *args, **kwargs):
@jawache
jawache / 0_reuse_code.js
Created October 28, 2013 12:33
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console