Skip to content

Instantly share code, notes, and snippets.

View razum2um's full-sized avatar

Vlad Bokov razum2um

View GitHub Profile
commit ce951e47a176ed6d460231e4f4606af443096b37
Author: Vlad Bokov <razum2um@mail.ru>
Date: Mon May 9 21:56:12 2011 +0700
banners block
diff --git a/.gitignore b/.gitignore
index 5f2338a..0235339 100644
--- a/.gitignore
+++ b/.gitignore
@razum2um
razum2um / gist:984201
Created May 21, 2011 03:21
zavode banners#2
diff --git a/cms/admin.py b/cms/admin.py
index 7e84d77..8438b67 100644
--- a/cms/admin.py
+++ b/cms/admin.py
@@ -9,6 +9,7 @@ from cms.models import *
from cms.forms import MenuItemAdminForm, BlockAdminForm
from cms.forms import NewsAdminForm, ArticleAdminForm
from cms.forms import GalleryAdminForm, ImageAdminForm
+from cms.forms import BannerAdminForm
# Utils
diff --git a/bin/ruby-whois b/bin/ruby-whois
index 46cc9af..7499de1 100755
--- a/bin/ruby-whois
+++ b/bin/ruby-whois
@@ -5,7 +5,7 @@ $:.unshift(File.expand_path("../../lib", __FILE__))
require 'optparse'
require 'ostruct'
require 'whois'
-
+require 'json'
#!/usr/bin/env python
import os
import sys
from datetime import datetime
from subprocess import Popen, PIPE
import json
class WhoisObject(object):
_data = {}
diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc
index 3e55f46..dd7b7d8 100644
--- a/CHANGELOG.rdoc
+++ b/CHANGELOG.rdoc
@@ -1,10 +1,10 @@
= Changelog
-== master
+== Release 2.0.4
@razum2um
razum2um / gist:1063986
Created July 4, 2011 21:47
django nested sets (level<=3) support
From bbb53d927c0949246c1735baaf34aa4261cfbb3c Mon Sep 17 00:00:00 2001
From: Vlad Bokov <razum2um@mail.ru>
Date: Tue, 5 Jul 2011 04:14:42 +0700
Subject: [PATCH] nested sets (level<=3) support
---
django/contrib/admin/options.py | 36 +++++++++++++++
.../admin/templates/admin/edit_inline/nested.html | 48 ++++++++++++++++++++
.../admin/templates/admin/edit_inline/tabular.html | 13 +++++-
3 files changed, 96 insertions(+), 1 deletions(-)
@razum2um
razum2um / gist:1064975
Created July 5, 2011 14:48
django CBV
# -*- coding: utf-8 -*-
from django.conf import settings
from django.views.generic import TemplateView, DetailView, CreateView, UpdateView
from django.shortcuts import get_object_or_404
from django.forms.models import inlineformset_factory
from django.core.paginator import Paginator, InvalidPage, EmptyPage
from django.core.urlresolvers import reverse
from django.utils.decorators import classonlymethod
from django.utils import simplejson
from django.http import HttpResponse, HttpResponseForbidden
diff --git a/django/db/backends/postgresql_psycopg2/creation.py b/django/db/backends/postgresql_psycopg2/creation.py
index 1f5609a..4468062 100644
--- a/django/db/backends/postgresql_psycopg2/creation.py
+++ b/django/db/backends/postgresql_psycopg2/creation.py
@@ -34,9 +34,12 @@ class DatabaseCreation(BaseDatabaseCreation):
def sql_table_creation_suffix(self):
assert self.connection.settings_dict['TEST_COLLATION'] is None, "PostgreSQL does not support collation setting at database creation time."
+ suffix = ''
+ if self.connection.settings_dict.get('TEST_TABLESPACE'):
@razum2um
razum2um / 0-readme.md
Created June 7, 2012 05:05 — forked from olgen/0-readme.md
ruby-1.9.3-p0 cumulative performance + gcdata + debug patch.

Patched ruby 1.9.3-p0 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p0 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84) as well as the gcdata-patch.

Huge thanks to funny-falcon for the performance patches.

@razum2um
razum2um / js console
Created December 10, 2012 13:36
Schools GET /api/schools/?username=contractor
GET /api/schools/?username=contractor
HTTP 200 OK
Vary: Accept
Content-Type: text/html
Allow: OPTIONS, GET
{
"schools": [
{