-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rahul
committed
Mar 25, 2012
0 parents
commit 1f3769f
Showing
2,603 changed files
with
129,419 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>betting</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.python.pydev.PyDevBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.python.pydev.pythonNature</nature> | ||
</natures> | ||
</projectDescription> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<?eclipse-pydev version="1.0"?> | ||
|
||
<pydev_project> | ||
<pydev_variables_property name="org.python.pydev.PROJECT_VARIABLE_SUBSTITUTION"> | ||
<key>GOOGLE_APP_ENGINE</key> | ||
<value>C:\Program Files (x86)\Google\google_appengine</value> | ||
</pydev_variables_property> | ||
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH"> | ||
<path>/betting</path> | ||
</pydev_pathproperty> | ||
<pydev_pathproperty name="org.python.pydev.PROJECT_EXTERNAL_SOURCE_PATH"> | ||
<path>${GOOGLE_APP_ENGINE}</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/antlr3</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/django_1_3</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/enum</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/fancy_urllib</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/google-api-python-client</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/graphy</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/grizzled</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/httplib2</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/ipaddr</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/jinja2</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/markupsafe</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/oauth2</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/prettytable</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/protorpc</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/python-gflags/tests</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/simplejson</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/sqlcmd</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/webapp2</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/webob</path> | ||
<path>${GOOGLE_APP_ENGINE}/lib/yaml/lib</path> | ||
</pydev_pathproperty> | ||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property> | ||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property> | ||
</pydev_project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
eclipse.preferences.version=1 | ||
encoding//open_facebook/api.py=utf-8 |
Empty file.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
application: iplbetter | ||
version: 1 | ||
runtime: python27 | ||
api_version: 1 | ||
threadsafe: yes | ||
|
||
builtins: | ||
- remote_api: on | ||
|
||
inbound_services: | ||
- warmup | ||
|
||
libraries: | ||
- name: django | ||
version: latest | ||
|
||
handlers: | ||
- url: /_ah/queue/deferred | ||
script: djangoappengine.deferred.handler.application | ||
login: admin | ||
|
||
- url: /_ah/stats/.* | ||
script: djangoappengine.appstats.application | ||
|
||
- url: /media/admin | ||
static_dir: django/contrib/admin/media | ||
expiration: '0' | ||
|
||
- url: /static/ | ||
static_dir: static_files | ||
expiration: '0' | ||
|
||
- url: /.* | ||
script: djangoappengine.main.application |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
def autodiscover(module_name): | ||
""" | ||
Automatically loads modules specified by module_name for each app in | ||
installed apps. | ||
""" | ||
from django.conf import settings | ||
from django.utils.importlib import import_module | ||
from django.utils.module_loading import module_has_submodule | ||
|
||
for app in settings.INSTALLED_APPS: | ||
mod = import_module(app) | ||
# Attempt to import the app's module. | ||
try: | ||
import_module('%s.%s' % (app, module_name)) | ||
except: | ||
# Decide whether to bubble up this error. If the app just | ||
# doesn't have an module, we can ignore the error | ||
# attempting to import it, otherwise we want it to bubble up. | ||
if module_has_submodule(mod, module_name): | ||
raise |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from django.utils.importlib import import_module | ||
from django.conf import settings | ||
|
||
# load all models.py to ensure signal handling installation or index loading | ||
# of some apps | ||
for app in settings.INSTALLED_APPS: | ||
try: | ||
import_module('%s.models' % (app)) | ||
except ImportError: | ||
pass | ||
|
||
class AutoloadMiddleware(object): | ||
"""Empty because the import above already does everything for us""" | ||
pass |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Load the siteconf module | ||
from django.conf import settings | ||
from django.utils.importlib import import_module | ||
SITECONF_MODULE = getattr(settings, 'AUTOLOAD_SITECONF', settings.ROOT_URLCONF) | ||
import_module(SITECONF_MODULE) |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cron: |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
def autodiscover(): | ||
from autoload import autodiscover as auto_discover | ||
auto_discover('dbindexes') | ||
|
||
def load_indexes(): | ||
from django.conf import settings | ||
from django.utils.importlib import import_module | ||
|
||
for name in getattr(settings, 'DB_INDEX_MODULES', ()): | ||
import_module(name) |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from .lookups import LookupDoesNotExist, ExtraFieldLookup | ||
from . import lookups as lookups_module | ||
from .resolver import resolver | ||
import inspect | ||
|
||
# TODO: add possibility to add lookup modules | ||
def create_lookup(lookup_def): | ||
for _, cls in inspect.getmembers(lookups_module): | ||
if inspect.isclass(cls) and issubclass(cls, ExtraFieldLookup) and \ | ||
cls.matches_lookup_def(lookup_def): | ||
return cls() | ||
raise LookupDoesNotExist('No Lookup found for %s .' % lookup_def) | ||
|
||
def register_index(model, mapping): | ||
for field_name, lookups in mapping.items(): | ||
if not isinstance(lookups, (list, tuple)): | ||
lookups = (lookups, ) | ||
|
||
# create indexes and add model and field_name to lookups | ||
# create ExtraFieldLookup instances on the fly if needed | ||
for lookup in lookups: | ||
lookup_def = None | ||
if not isinstance(lookup, ExtraFieldLookup): | ||
lookup_def = lookup | ||
lookup = create_lookup(lookup_def) | ||
lookup.contribute(model, field_name, lookup_def) | ||
resolver.create_index(lookup) |
Binary file not shown.
Oops, something went wrong.