Skip to content

Instantly share code, notes, and snippets.

View airsoull's full-sized avatar

Cristian Sepúlveda airsoull

View GitHub Profile
@raliste
raliste / gist:4091897
Created November 16, 2012 23:31
Joldit's Webpay Plus (Django)
## views.py
import tempfile
import os
import commands
import cgi
from django import http
from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render
@kevinSuttle
kevinSuttle / meta-tags.md
Last active May 1, 2025 21:56 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@sleekslush
sleekslush / formset_updateview_example.py
Created January 6, 2012 06:42
An example of extending UpdateView to use a formset instead of a form
class UserUpdateView(AuthenticatorViewMixin, UpdateView):
model = User
template_name = 'manager/authenticator/user_list.html'
def get_form_class(self):
return modelformset_factory(User, extra=0)
def get_form_kwargs(self):
kwargs = super(UserUpdateView, self).get_form_kwargs()
kwargs['queryset'] = kwargs['instance']
@gourneau
gourneau / tasty_put.py
Created April 8, 2011 20:56
PUT to a tastypie API
#This is a little example of how to make a PUT request (see http://microformats.org/wiki/rest/urls )
#To a API written with tastypie (https://github.com/toastdriven/django-tastypie )
# import the standard JSON parser
import json
# import the REST library (from http://code.google.com/p/python-rest-client/)
from restful_lib import Connection
#site url
base_url = "http://IP/api/v1"