I hereby claim:
- I am jokull on github.
- I am jokull (https://keybase.io/jokull) on keybase.
- I have a public key whose fingerprint is 433B F05A 668A 1878 2A74 FAC7 32EE 39EB 0247 7299
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
SELECT (gatekeeper_moderatedobject.moderation_status) AS "_moderation_status", | |
(gatekeeper_moderatedobject.flagged) AS "_flagged", | |
(gatekeeper_moderatedobject.id) AS "_moderation_id", | |
"projects_project"."id", | |
"projects_project"."created", | |
"projects_project"."modified", | |
"projects_project"."title", | |
"projects_project"."mission_statement", | |
"projects_project"."extra_description", | |
"projects_project"."picture_id", |
from django.conf import settings | |
from django.db.models import F, Q, Model, IntegerField, BooleanField | |
from django.db.models.query import QuerySet | |
from django.core.cache import cache | |
from django.utils.hashcompat import sha_constructor | |
from peopleproject.utils.models import BaseModel | |
class ModerateModel(BaseModel): | |
""" |
# encoding=utf-8 | |
""" | |
Author: Jökull Sólberg Auðunsson (solberg.is) | |
""" | |
from django.core.files.storage import get_storage_class | |
from django.db.models import ImageField | |
from uuid import uuid4 |
/*! | |
* jQuery.dropload v0.1 | |
* | |
* Copyright 2010, Jökull Sólberg Auðunsson | |
* FreeBSD License | |
* Description: | |
* For each drop of one or more files the client asynchronously | |
* sends the files to the server. The request is a multipart | |
* formencoded binary stream, making it easy to process on the | |
* server. Works in Chrome 7, maybe Safari. |
import datetime | |
import feedparser | |
import bleach | |
from flask import g, Markup | |
from kex.app import app | |
class Status(object): | |
ALLOWED_TAGS = [] | |
from flaskext.fungiform import Form, widgets, TextField, FileField | |
class Admin(object): | |
module = Module(__name__, name='_admin', url_prefix='/_admin') | |
def __init__(self, app=None, editables=[]): | |
for editable in editables: | |
self.register_editable(editable) |
(function(){ | |
var resetLi = function($li, index){ | |
$li.find(":input, label").each(function(i){ | |
var $that = $(this); | |
$.each(['name', 'id', 'for'], function(i, attribute){ | |
var value = $that.attr(attribute); | |
if(value){ | |
$that.attr(attribute, value.replace(/\d+/, index)) | |
} | |
}); |
<html> | |
<head> | |
<script type="text/template" id="tpl-instagram-post"> | |
<a href="<%= link %>"><img src="<%= images.low_resolution.url %>"></a> | |
<p class="date"><%= created_time %></p> | |
<p class="user">@<%= user.username %></p> | |
<% if(caption){ %> | |
<p class="caption"><%= caption.text %></p> | |
<% } %> | |
</script> |
# encoding=utf-8 | |
""" | |
Use Tumblr as a backend for a blog. This module | |
helps interfacing with their APIv2 in a pythonic way. Caching | |
keeps things responsive and guards against API downtime and | |
response failures. | |
Assumptions: |