Merge branch 'daniel/remove-secure-hostname'
diff --git a/app/soc/modules/gci/views/helper/request_data.py b/app/soc/modules/gci/views/helper/request_data.py
index c5bf88b..42bc0da 100644
--- a/app/soc/modules/gci/views/helper/request_data.py
+++ b/app/soc/modules/gci/views/helper/request_data.py
@@ -219,9 +219,7 @@
@property
def css_path(self):
"""Returns the css_path property."""
- if not self._isSet(self._css_path):
- self._css_path = 'gci'
- return self._css_path
+ return 'gci'
@property
def is_mentor(self):
diff --git a/app/soc/modules/gsoc/views/helper/request_data.py b/app/soc/modules/gsoc/views/helper/request_data.py
index ef177da..f8f5abe 100644
--- a/app/soc/modules/gsoc/views/helper/request_data.py
+++ b/app/soc/modules/gsoc/views/helper/request_data.py
@@ -210,7 +210,6 @@
self.models = types.SOC_MODELS
# program wide fields
- self._program = self._unset
self._program_timeline = self._unset
self._programs = self._unset
self._org_app = self._unset
@@ -233,9 +232,7 @@
@property
def css_path(self):
"""Returns the css_path property."""
- if not self._isSet(self._css_path):
- self._css_path = 'gsoc'
- return self._css_path
+ return 'gsoc'
@property
def is_mentor(self):
diff --git a/app/soc/views/helper/request_data.py b/app/soc/views/helper/request_data.py
index fc06043..ce91079 100644
--- a/app/soc/views/helper/request_data.py
+++ b/app/soc/views/helper/request_data.py
@@ -225,7 +225,6 @@
self._is_developer = self._unset
self._is_host = self._unset
self._gae_user = self._unset
- self._css_path = self._unset
self._ds_write_disabled = self._unset
self._timeline = self._unset
@@ -260,12 +259,10 @@
@property
def css_path(self):
"""Returns the css_path property."""
- if not self._isSet(self._css_path):
- # TODO(daniel): this should not return gsoc in module
- # I believe css_path is needed in the main module because of a few sites
- # that are not specific to any module, like site or host
- self._css_path = 'gsoc'
- return self._css_path
+ # TODO(daniel): this should not return gsoc in module
+ # I believe css_path is needed in the main module because of a few sites
+ # that are not specific to any module, like site or host
+ return 'gsoc'
@property
def gae_user(self):
diff --git a/tests/app/soc/modules/gci/views/test_base_templates.py b/tests/app/soc/modules/gci/views/test_base_templates.py
index 79f7a39..1b8a9a0 100644
--- a/tests/app/soc/modules/gci/views/test_base_templates.py
+++ b/tests/app/soc/modules/gci/views/test_base_templates.py
@@ -25,6 +25,8 @@
from tests import profile_utils
+# TODO(nathaniel): Eliminate this class or at least unify it with the two
+# other MockRequestData classes floating around tests/.
class MockRequestData(object):
"""Class used to simulate request_data.RequestData gae_user and request
properties."""
@@ -39,8 +41,10 @@
user = profile_utils.seedUser(email=user_email)
profile_utils.login(user)
self.gae_user = users.User()
+ self.user = user
else:
self.gae_user = None
+ self.user = None
self.request = http.HttpRequest()