[extensions-web] extensions: Remove _json things
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] extensions: Remove _json things
- Date: Mon, 6 Aug 2012 21:27:51 +0000 (UTC)
commit cd9e70359937fe951cd398b469de719544475583
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Aug 6 17:15:35 2012 -0300
extensions: Remove _json things
Not sure why I ever did this...
sweettooth/extensions/models.py | 4 ----
sweettooth/extensions/views.py | 4 ++--
2 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/sweettooth/extensions/models.py b/sweettooth/extensions/models.py
index ef06fb2..4e933d2 100644
--- a/sweettooth/extensions/models.py
+++ b/sweettooth/extensions/models.py
@@ -153,10 +153,6 @@ class Extension(models.Model):
def visible_shell_version_map(self):
return build_shell_version_map(self.visible_versions)
- @property
- def visible_shell_version_map_json(self):
- return json.dumps(self.visible_shell_version_map)
-
class ExtensionPopularityItem(models.Model):
extension = models.ForeignKey(Extension, db_index=True,
related_name='popularity_items')
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index f6b97b2..df0a851 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -236,7 +236,7 @@ def extension_view(request, obj, **kwargs):
else:
template_name = "extensions/detail.html"
- context = dict(shell_version_map = extension.visible_shell_version_map_json,
+ context = dict(shell_version_map = json.dumps(extension.visible_shell_version_map),
extension = extension,
all_versions = extension.versions.order_by('-version'),
is_visible = extension.latest_version is not None)
@@ -353,7 +353,7 @@ def ajax_set_status_view(request, newstatus):
context = dict(version=version,
extension=extension)
- return dict(svm=extension.visible_shell_version_map_json,
+ return dict(svm=json.dumps(extension.visible_shell_version_map),
mvs=render_to_string('extensions/multiversion_status.html', context))
@transaction.commit_manually
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]