merge with wrong head
authorSverre Rabbelier <sverre@rabbelier.nl>
Mon, 07 Sep 2009 20:27:37 +0200
changeset 2878 cf4b80992451
parent 2871 e440e94a874b (diff)
parent 2877 8bbdc95f87f8 (current diff)
child 2879 cb0f9b4646aa
merge with wrong head
thirdparty/google_appengine/lib/django/MANIFEST.in
thirdparty/google_appengine/lib/django/django/contrib/flatpages/README.TXT
thirdparty/google_appengine/lib/django/django/contrib/formtools/templates/formtools/form.html
thirdparty/google_appengine/lib/django/django/contrib/formtools/templates/formtools/preview.html
thirdparty/google_appengine/lib/django/django/contrib/redirects/README.TXT
thirdparty/google_appengine/lib/django/django/dispatch/license.txt
thirdparty/google_appengine/lib/django/django/utils/simplejson/LICENSE.txt
thirdparty/google_appengine/lib/django/examples/__init__.py
thirdparty/google_appengine/lib/django/examples/hello/__init__.py
thirdparty/google_appengine/lib/django/examples/hello/urls.py
thirdparty/google_appengine/lib/django/examples/hello/views.py
thirdparty/google_appengine/lib/django/examples/manage.py
thirdparty/google_appengine/lib/django/examples/settings.py
thirdparty/google_appengine/lib/django/examples/urls.py
thirdparty/google_appengine/lib/django/examples/views.py
thirdparty/google_appengine/lib/django/extras/README.TXT
thirdparty/google_appengine/lib/django/extras/django_bash_completion
thirdparty/google_appengine/lib/django/tests/modeltests/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/basic/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/basic/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/choices/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/choices/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/custom_columns/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/custom_columns/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/custom_managers/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/custom_managers/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/custom_methods/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/custom_methods/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/custom_pk/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/custom_pk/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/empty/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/empty/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/field_defaults/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/field_defaults/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/fixtures/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/fixtures/fixtures/fixture1.json
thirdparty/google_appengine/lib/django/tests/modeltests/fixtures/fixtures/fixture2.json
thirdparty/google_appengine/lib/django/tests/modeltests/fixtures/fixtures/fixture2.xml
thirdparty/google_appengine/lib/django/tests/modeltests/fixtures/fixtures/fixture3.xml
thirdparty/google_appengine/lib/django/tests/modeltests/fixtures/fixtures/initial_data.json
thirdparty/google_appengine/lib/django/tests/modeltests/fixtures/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/generic_relations/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/generic_relations/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/get_latest/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/get_latest/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/get_object_or_404/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/get_object_or_404/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/get_or_create/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/get_or_create/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/invalid_models/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/invalid_models/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/lookup/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/lookup/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/m2m_and_m2o/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/m2m_and_m2o/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/m2m_intermediary/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/m2m_intermediary/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/m2m_multiple/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/m2m_multiple/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/m2m_recursive/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/m2m_recursive/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/m2o_recursive/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/m2o_recursive/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/m2o_recursive2/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/m2o_recursive2/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/manipulators/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/manipulators/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/many_to_many/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/many_to_many/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/many_to_one/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/many_to_one/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/many_to_one_null/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/many_to_one_null/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/model_forms/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/model_forms/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/model_inheritance/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/model_inheritance/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/mutually_referential/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/mutually_referential/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/one_to_one/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/one_to_one/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/or_lookups/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/or_lookups/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/ordering/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/ordering/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/pagination/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/pagination/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/properties/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/properties/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/reserved_names/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/reserved_names/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/reverse_lookup/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/reverse_lookup/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/save_delete_hooks/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/save_delete_hooks/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/select_related/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/select_related/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/serializers/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/serializers/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/str/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/str/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/test_client/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/test_client/fixtures/testdata.json
thirdparty/google_appengine/lib/django/tests/modeltests/test_client/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/test_client/urls.py
thirdparty/google_appengine/lib/django/tests/modeltests/test_client/views.py
thirdparty/google_appengine/lib/django/tests/modeltests/transactions/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/transactions/models.py
thirdparty/google_appengine/lib/django/tests/modeltests/validation/__init__.py
thirdparty/google_appengine/lib/django/tests/modeltests/validation/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/bug639/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/bug639/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/bug639/test.jpg
thirdparty/google_appengine/lib/django/tests/regressiontests/bug639/tests.py
thirdparty/google_appengine/lib/django/tests/regressiontests/cache/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/cache/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/cache/tests.py
thirdparty/google_appengine/lib/django/tests/regressiontests/datastructures/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/datastructures/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/datastructures/tests.py
thirdparty/google_appengine/lib/django/tests/regressiontests/dateformat/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/dateformat/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/dateformat/tests.py
thirdparty/google_appengine/lib/django/tests/regressiontests/db_typecasts/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/db_typecasts/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/db_typecasts/tests.py
thirdparty/google_appengine/lib/django/tests/regressiontests/defaultfilters/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/defaultfilters/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/defaultfilters/tests.py
thirdparty/google_appengine/lib/django/tests/regressiontests/dispatch/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/dispatch/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/dispatch/tests/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/dispatch/tests/test_dispatcher.py
thirdparty/google_appengine/lib/django/tests/regressiontests/dispatch/tests/test_robustapply.py
thirdparty/google_appengine/lib/django/tests/regressiontests/dispatch/tests/test_saferef.py
thirdparty/google_appengine/lib/django/tests/regressiontests/forms/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/forms/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/forms/tests.py
thirdparty/google_appengine/lib/django/tests/regressiontests/httpwrappers/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/httpwrappers/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/httpwrappers/tests.py
thirdparty/google_appengine/lib/django/tests/regressiontests/humanize/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/humanize/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/humanize/tests.py
thirdparty/google_appengine/lib/django/tests/regressiontests/initial_sql_regress/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/initial_sql_regress/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/initial_sql_regress/sql/simple.sql
thirdparty/google_appengine/lib/django/tests/regressiontests/invalid_admin_options/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/invalid_admin_options/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/many_to_one_regress/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/many_to_one_regress/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/markup/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/markup/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/markup/tests.py
thirdparty/google_appengine/lib/django/tests/regressiontests/null_queries/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/null_queries/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/one_to_one_regress/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/one_to_one_regress/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/serializers_regress/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/serializers_regress/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/serializers_regress/tests.py
thirdparty/google_appengine/lib/django/tests/regressiontests/string_lookup/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/string_lookup/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/templates/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/templates/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/templates/tests.py
thirdparty/google_appengine/lib/django/tests/regressiontests/templates/urls.py
thirdparty/google_appengine/lib/django/tests/regressiontests/templates/views.py
thirdparty/google_appengine/lib/django/tests/regressiontests/urlpatterns_reverse/__init__.py
thirdparty/google_appengine/lib/django/tests/regressiontests/urlpatterns_reverse/models.py
thirdparty/google_appengine/lib/django/tests/regressiontests/urlpatterns_reverse/tests.py
thirdparty/google_appengine/lib/django/tests/runtests.py
thirdparty/google_appengine/lib/django/tests/templates/404.html
thirdparty/google_appengine/lib/django/tests/templates/500.html
thirdparty/google_appengine/lib/django/tests/templates/login.html
thirdparty/google_appengine/lib/django/tests/urls.py
--- a/app/soc/cache/home.py	Mon Sep 07 20:07:58 2009 +0200
+++ b/app/soc/cache/home.py	Mon Sep 07 20:27:37 2009 +0200
@@ -27,7 +27,6 @@
 from google.appengine.api import memcache
 
 from soc.logic import accounts
-from soc.logic import system
 
 import soc.cache.base
 
@@ -36,12 +35,7 @@
   """Returns the memcache key for an entities homepage.
   """
 
-  host = system.getHostname()
-  version = system.getAppVersion()
-  kind = entity.kind()
-  key = entity.key().id_or_name()
-
-  return 'homepage_for_%s_%s_%s_%s' % (host, version, kind, key)
+  return 'homepage_for_%s_%s' % (entity.kind(), entity.key().id_or_name())
 
 
 def get(self, *args, **kwargs):
--- a/app/soc/logic/helper/notifications.py	Mon Sep 07 20:07:58 2009 +0200
+++ b/app/soc/logic/helper/notifications.py	Mon Sep 07 20:27:37 2009 +0200
@@ -22,6 +22,7 @@
   ]
 
 
+import os
 import time
 
 from django.template import loader
@@ -33,7 +34,6 @@
 from soc.logic import accounts
 from soc.logic import dicts
 from soc.logic import mail_dispatcher
-from soc.logic import system
 from soc.views.helper import redirects
 
 
@@ -81,7 +81,7 @@
   to_user = user_logic.getForFields(properties, unique=True)
 
   invitation_url = "http://%(host)s%(index)s" % {
-      'host' : system.getHostname(),
+      'host' : os.environ['HTTP_HOST'],
       'index': redirects.getInviteProcessRedirect(entity, None),
       }
 
@@ -164,7 +164,7 @@
   url = "http://%(host)s%(redirect)s" % {
       'redirect': redirects.getApplicantRedirect(entity,
       {'url_name': params['group_url_name']}),
-      'host': system.getHostname(),
+      'host': os.environ['HTTP_HOST'],
       }
 
   message_properties = {
@@ -269,7 +269,7 @@
 
   # create the url to show this notification
   notification_url = "http://%(host)s%(index)s" % {
-      'host' : system.getHostname(),
+      'host' : os.environ['HTTP_HOST'],
       'index': redirects.getPublicRedirect(notification_entity,
           notification_view.getParams())}
 
@@ -340,7 +340,7 @@
           'name': user_entity.name
           },
       'site_name': site_name,
-      'site_location': 'http://%s' % system.getHostname(),
+      'site_location': 'http://%s' % os.environ['HTTP_HOST'],
       }
 
   # send out the message using the default welcome template
--- a/app/soc/logic/system.py	Mon Sep 07 20:07:58 2009 +0200
+++ b/app/soc/logic/system.py	Mon Sep 07 20:27:37 2009 +0200
@@ -26,12 +26,6 @@
 import settings
 
 
-def getHostname():
-  """Returns the hostname
-  """
-
-  return os.environ.get('HTTP_HOST')
-
 def getAppVersion():
   """Returns the Google App Engine "version" of the running instance.
   """
--- a/app/soc/modules/ghop/tasks/task_update.py	Mon Sep 07 20:07:58 2009 +0200
+++ b/app/soc/modules/ghop/tasks/task_update.py	Mon Sep 07 20:27:37 2009 +0200
@@ -23,6 +23,7 @@
 
 
 import logging
+import os
 
 from google.appengine.api.labs import taskqueue
 from google.appengine.ext import db
@@ -30,7 +31,6 @@
 from django import http
 from django.utils.translation import ugettext
 
-from soc.logic import system
 from soc.tasks.helper import error_handler
 from soc.views.helper import redirects
 
@@ -180,7 +180,7 @@
       subscriber_start_index:subscriber_start_index+batch_size])
 
   task_url = "http://%(host)s%(task)s" % {
-                 'host': system.getHostname(),
+                 'host': os.environ['HTTP_HOST'],
                  'task': redirects.getPublicRedirect(
                      task_entity, {'url_name': 'ghop/task'}),
                  }
--- a/app/soc/tasks/surveys.py	Mon Sep 07 20:07:58 2009 +0200
+++ b/app/soc/tasks/surveys.py	Mon Sep 07 20:27:37 2009 +0200
@@ -23,13 +23,13 @@
 
 
 import logging
+import os
 
 from google.appengine.api.labs import taskqueue
 
 from django import http
 
 from soc.tasks.helper import error_handler
-from soc.logic import system
 
 
 def getDjangoURLPatterns():
@@ -222,7 +222,7 @@
 
     survey_url = "http://%(host)s%(redirect)s" % {
       'redirect': survey_redirect,
-      'host': system.getHostname(),
+      'host': os.environ['HTTP_HOST'],
       }
 
     # set the context for the mail template
--- a/app/soc/views/helper/requests.py	Mon Sep 07 20:07:58 2009 +0200
+++ b/app/soc/views/helper/requests.py	Mon Sep 07 20:27:37 2009 +0200
@@ -22,10 +22,9 @@
   ]
 
 
+import os
 import urlparse
 
-from soc.logic import system
-
 
 def getSingleIndexedParamValue(request, param_name, values=()):
   """Returns a value indexed by a query parameter in the HTTP request.
@@ -120,7 +119,7 @@
     # no HTTP referrer, so cannot possibly start with expected prefix
     return False
 
-  http_host = 'http://%s/%s' % (system.getHostname(), url_name)
+  http_host = 'http://%s/%s' % (os.environ['HTTP_HOST'], url_name)
 
   if http_from.startswith(http_host):
     return True
--- a/app/soc/views/models/org_app.py	Mon Sep 07 20:07:58 2009 +0200
+++ b/app/soc/views/models/org_app.py	Mon Sep 07 20:27:37 2009 +0200
@@ -22,6 +22,8 @@
   ]
 
 
+import os
+
 from django import forms
 from django.utils import simplejson
 
@@ -30,7 +32,6 @@
 from soc.logic import dicts
 from soc.logic import mail_dispatcher
 from soc.logic import models as model_logic
-from soc.logic import system
 from soc.logic.models import program as program_logic
 from soc.logic.models import org_app as org_app_logic
 from soc.views import helper
@@ -238,7 +239,7 @@
         # use the accepted template and subject
         template = params['accepted_mail_template']
         context['subject'] = 'Congratulations!'
-        context['HTTP_host'] = 'http://%s' % (system.getHostname())
+        context['HTTP_host'] = 'http://%s' % (os.environ['HTTP_HOST'])
       elif status == 'rejected':
         # use the rejected template and subject
         template = params['rejected_mail_template']
--- a/app/soc/views/models/program.py	Mon Sep 07 20:07:58 2009 +0200
+++ b/app/soc/views/models/program.py	Mon Sep 07 20:27:37 2009 +0200
@@ -25,6 +25,8 @@
   ]
 
 
+import os
+
 from django import forms
 from django import http
 from django.utils.translation import ugettext
@@ -32,7 +34,6 @@
 from soc.logic import allocations
 from soc.logic import cleaning
 from soc.logic import dicts
-from soc.logic import system
 from soc.logic.helper import timeline as timeline_helper
 from soc.logic.models import host as host_logic
 from soc.logic.models import mentor as mentor_logic
@@ -415,7 +416,7 @@
     contents = [content]
 
     return_url =  "http://%(host)s%(index)s" % {
-      'host' : system.getHostname(),
+      'host' : os.environ['HTTP_HOST'],
       'index': redirects.getSlotsRedirect(program, params)
       }
 
--- a/scripts/interactive.py	Mon Sep 07 20:07:58 2009 +0200
+++ b/scripts/interactive.py	Mon Sep 07 20:27:37 2009 +0200
@@ -97,8 +97,6 @@
     context: locals that should be added to the shell
   """
 
-  from google.appengine.api import apiproxy_stub_map
-  from google.appengine.api.memcache import memcache_stub
   from google.appengine.ext import db
   from google.appengine.ext.remote_api import remote_api_stub
 
@@ -113,8 +111,6 @@
     host = '%s.appspot.com' % app_id
 
   remote_api_stub.ConfigureRemoteDatastore(app_id, '/remote_api', auth_func, host)
-  apiproxy_stub_map.apiproxy.RegisterStub('memcache',
-      memcache_stub.MemcacheServiceStub())
 
   context['deepFetch'] = deepFetch