This file contains 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 haystack | |
from django.core.management import call_command | |
from django.test.utils import override_settings | |
TEST_INDEX = { | |
'default': { | |
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine', | |
'URL': 'http://127.0.0.1:9200/', |
This file contains 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 django.db.models.query import QuerySet | |
from django.db.models import Manager | |
from django.contrib.contenttypes.models import ContentType | |
from django.contrib.contenttypes.generic import GenericForeignKey | |
class GFKManager(Manager): | |
""" | |
A manager that returns a GFKQuerySet instead of a regular QuerySet. | |
""" |
This file contains 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
<html> | |
<head> | |
<script type="text/javascript">; | |
function mainLoop(){ | |
ctx.clearRect(0,0,500,410); | |
playerPaddle.shape() | |
enemyPaddle.shape() | |
ball1.drawBall() | |
This file contains 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 importlib, os | |
APP_DIRS = (os.path.abspath(os.path.join(PROJECT_ROOT, 'test')),) | |
sys.path.extend(APP_DIRS) | |
BASE_URL_CONFS = [] | |
for app_dir in APP_DIRS: | |
for app in os.listdir(app_dir): | |
if not app.startswith('.') and app not in INSTALLED_APPS: | |
try: | |
app_settings = importlib.import_module('%s.settings' % app) | |
if getattr(app_settings, 'APP_NAME', '') != '': |