Skip to content

Instantly share code, notes, and snippets.

View debugger22's full-sized avatar

Sudhanshu Mishra debugger22

View GitHub Profile
@debugger22
debugger22 / admin.py
Created September 11, 2017 07:52 — forked from mariocesar/admin.py
Django admin decorator to create a confirmation form action, like the default delete action works
from .models import Post, Category
from .decorators import action_form
class PostCategoryForm(forms.Form):
title = 'Update category for the selected posts'
category = forms.ModelChoiceField(queryset=Category.objects.all())
@admin.register(Post)
@debugger22
debugger22 / 0_reuse_code.js
Created May 9, 2014 15:40
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