Skip to content

Commit

Permalink
Subclass an actual class
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Gonzalez committed Sep 17, 2015
1 parent 5321fce commit 5176149
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions webpack/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
from django.contrib.staticfiles.storage import StaticFilesStorage
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from storages.backends.s3boto import S3BotoStorage
import os
import json

from storages.backends.s3boto import S3BotoStorage
StaticS3BotoStorage = lambda: S3BotoStorage(location='static')

class WebpackDevServerStorage(StaticFilesStorage):
"""
Simple StaticFilesStorage based class that can be used together with the assets-webpack-plugin to include
Expand Down Expand Up @@ -66,7 +64,7 @@ def url(self, name):
return super(WebpackDevServerStorage, self).url(name)


class WebpackS3Storage(StaticS3BotoStorage):
class WebpackS3Storage(S3BotoStorage):
"""
Simple StaticFilesStorage based class that can be used together with the assets-webpack-plugin to include
hashed files.
Expand All @@ -84,6 +82,7 @@ def __init__(self, assets_file=None, *args, **kwargs):
self.assets_file = settings.WEBPACK_ASSETS_FILE
self.check_assets()
self.load_json()
self.location = 'static'
super(WebpackDevServerStorage, self).__init__(*args, **kwargs)

def check_assets(self):
Expand Down

0 comments on commit 5176149

Please sign in to comment.