Merge pull request #3387 from diox/update-django-product-details

Upgrade django-product-details to the latest version
This commit is contained in:
Mathieu Pillard 2016-09-01 16:09:01 +02:00 коммит произвёл GitHub
Родитель 62fe80dbc7 2acfe625d2
Коммит a5cb826d1f
3 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -106,8 +106,9 @@ django-extensions==1.6.7 \
django-filter==0.7 \
--hash=sha256:0f8fc4712f5b8da9a2d5776317d015395d58bbd94649951e35de7df2ccc69e21 \
--hash=sha256:360d6aa7c07daf95f8260db9a9dc0e04727eb4e2e45bea4f01c2b45d4722ff38
django-mozilla-product-details==0.8.2 \
--hash=sha256:339ddf521bb4787894aa8652a4255aafb886c37352118bd0acffa1bd6ddb1d4b
django-mozilla-product-details==0.12.1 \
--hash=sha256:a31a51102e8c2f047f8aa62b8bdc552f7a31d9c69f2cb16393225c3ee0db72b5 \
--hash=sha256:25ac11bd4544fef3236f32439f6b1de3bcf931f8b34c7786ab40f0ec85626eeb
django-multidb-router==0.5.1 \
--hash=sha256:00b34b24d4f32077bc53ebb940e9a50edbf086917d4b2eb6a399a05890463650
django-post-request-task==0.0.3 \

Просмотреть файл

@ -9,7 +9,14 @@ class NoCachePDFileStorage(PDFileStorage):
def data(self, name):
"""Return the parsed JSON data of the requested file name.
Doesn't use the django-cache.
Doesn't use the django-cache, doesn't validate the name, just gets the
data from the filesystem using self.content() and store it in a dict
on the product details backend instance.
It makes it more efficient than just using PDFileStorage with a dummy
cache backend, because we do store the result, just not in a cache
backend that needs network round-trips, and we avoid walking the
filesystem entirely.
"""
cache_key = self._get_cache_key(name)

Просмотреть файл

@ -169,7 +169,6 @@ def lazy_langs(languages):
# Where product details are stored see django-mozilla-product-details
PROD_DETAILS_DIR = path('src', 'olympia', 'lib', 'product_json')
PROD_DETAILS_URL = 'https://svn.mozilla.org/libs/product-details/json/'
PROD_DETAILS_STORAGE = 'olympia.lib.product_details_backend.NoCachePDFileStorage' # noqa
# Override Django's built-in with our native names