Skip to content

Instantly share code, notes, and snippets.

View ericholscher's full-sized avatar

Eric Holscher ericholscher

View GitHub Profile
diff --git a/tests/regressiontests/context_processors/tests.py b/tests/regressiontests/context_processors/tests.py
index 31ecc83..c2f8c4b 100644
--- a/tests/regressiontests/context_processors/tests.py
+++ b/tests/regressiontests/context_processors/tests.py
@@ -72,6 +72,13 @@ class AuthContextProcessorTests(TestCase):
response = self.client.get('/auth_processor_messages/')
self.assertContains(response, "Message 1")
+ def test_user_type(self):
+ self.client.login(username='super', password='secret')
-> python pip.py install --upgrade --test wsgiref
Downloading/unpacking wsgiref
Downloading wsgiref-0.1.2.zip
Running setup.py egg_info for package wsgiref
Testing collected packages: wsgiref
Running setup.py test for wsgiref
running test
running egg_info
writing wsgiref.egg-info/PKG-INFO
writing top-level names to wsgiref.egg-info/top_level.txt
@ericholscher
ericholscher / diff_settings.py
Created November 10, 2009 21:45
diff_settings.py
import os
import sys
import difflib
from pprint import pformat
settings1 = sys.argv[1]
settings2 = sys.argv[2]
def get_diff_msg(first, second, fromfile='First', tofile='Second'):
From http://groups.google.com/group/django-developers/msg/7236b842d53fb58a
Let me tell you a store about three people named Everybody, Anybody,
Somebody and Nobody.
There was a job to be done. Everybody agreed it should be done.
Anybody could have done it. Somebody should have done it. Nobody
actually did it. :-)
"""
This fabric file makes setting up and deploying a django application much
easier, but it does make a few assumptions. Namely that you're using Git,
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have
Django installed on your local machine and SSH installed on both the local
machine and any servers you want to deploy to.
_note that I've used the name project_name throughout this example. Replace
this with whatever your project is called._
Hosting Sphinx docs at GitHub
-----------------------------
Before: Run sphinx-quickstart in docs/
1. Follow "Project Pages" instructions from http://pages.github.com/ to create a gh-pages branch
2. Add Sphinx html build dir as git submodule:
git checkout master
git submodule add -b gh-pages git@github.com:arthurk/django-disqus.git docs/_build/html
server {
listen 80;
server_name rtfd.org *.rtfd.org;
if ($host ~* (.*)\.rtfd\.org) {
set $slug $1;
rewrite ^(.*)$ http://$slug.readthedocs.org;
}
rewrite ^/(\w+)$ http://$1.readthedocs.org/;
rewrite ^(.*)$ http://readthedocs.org/;
+ \ Navigate the maze /
+ \ of our code? /
+ \ To the servers /
+ ] your changes rode [ ,'|
+ ] [ / |
+ ]___ ___[ ,' |
+ ] ]\ /[ [ |: |
+ ] ] \ / [ [ |: |
+ ] ] ] [ [ [ |: |
+ ] ] ]__ __[ [ [ |: |
description "Gunicorn for ReadTheDocs"
start on runlevel [2345]
stop on runlevel [!2345]
#Send KILL after 20 seconds
kill timeout 5
respawn
env VENV="/home/docs/sites/readthedocs.org"
description "Gunicorn for ReadTheDocs"
start on runlevel [2345]
stop on runlevel [!2345]
#Send KILL after 20 seconds
kill timeout 5
respawn
env VENV="/home/docs/sites/readthedocs.org"