This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Super minimal Disqus API client""" | |
import urllib | |
try: | |
import json | |
except ImportError: | |
import simplejson as json | |
class DisqusClient(object): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
PROJECT_PATH = os.path.realpath(os.path.dirname(__file__)) | |
ADMINS = (('Your Name', '[email protected]'),) | |
ADMIN_MEDIA_PREFIX = '/static/admin/' | |
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.postgresql_psycopg2', | |
'NAME': '', | |
'USER': '', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
A quick copy/paste action you can drop into your `./manage.py shell` session so any | |
queries executed are displayed in the shell output. | |
If sqlparse is available it will use that to pretty print the SQL: | |
http://code.google.com/p/python-sqlparse/ | |
""" | |
from django.db.backends import util | |
try: | |
import sqlparse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mimetypes import guess_type | |
from django.core.exceptions import ImproperlyConfigured | |
from django.core.files.storage import Storage | |
from django.utils.encoding import iri_to_uri | |
import re | |
try: | |
import S3 | |
except ImportError: | |
raise ImproperlyConfigured, "Could not load amazon's S3 bindings.\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
import readline | |
import ipy_defaults | |
import IPython.ipapi | |
import ipy_stock_completers | |
ip = IPython.ipapi.get() | |
o = ip.options | |
NewerOlder