Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-pipeline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-pipeline
Commits
f86026f7
Commit
f86026f7
authored
Dec 14, 2011
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change fallback import order
parent
c917ca04
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
pipeline/finders.py
+4
-4
pipeline/storage.py
+7
-7
No files found.
pipeline/finders.py
View file @
f86026f7
try
:
from
django.contrib.staticfiles.finders
import
BaseStorageFinder
except
ImportError
:
from
staticfiles.finders
import
BaseStorageFinder
except
ImportError
:
from
django.contrib.staticfiles.finders
import
BaseStorageFinder
from
pipeline.storage
import
PipelineStorage
from
pipeline.storage
import
Pipeline
Finder
Storage
class
PipelineFinder
(
BaseStorageFinder
):
storage
=
PipelineStorage
storage
=
Pipeline
Finder
Storage
pipeline/storage.py
View file @
f86026f7
try
:
from
django.contrib.staticfiles
import
finders
from
django.contrib.staticfiles.storage
import
CachedFilesMixin
,
StaticFilesStorage
except
ImportError
:
from
staticfiles
import
finders
from
staticfiles.storage
import
CachedFilesMixin
,
StaticFilesStorage
from
staticfiles.storage
import
CachedStaticFilesStorage
,
StaticFilesStorage
except
ImportError
:
from
django.contrib.staticfiles
import
finders
from
django.contrib.staticfiles.storage
import
CachedStaticFilesStorage
,
StaticFilesStorage
from
django.core.exceptions
import
ImproperlyConfigured
from
django.core.files.storage
import
get_storage_class
from
django.utils.functional
import
LazyObject
from
pipeline.conf
import
settings
...
...
@@ -39,11 +38,12 @@ class PipelineFinderStorage(BaseFinderStorage):
finders
=
finders
class
PipelineStorage
(
StaticFiles
Storage
):
class
PipelineStorage
(
PipelineFinder
Storage
):
def
post_process
(
self
,
paths
,
dry_run
=
False
,
**
options
):
from
pipeline.packager
import
Packager
if
dry_run
:
return
[]
packager
=
Packager
()
for
package_name
in
packager
.
packages
[
'css'
]:
package
=
packager
.
package_for
(
'css'
,
package_name
)
...
...
@@ -56,7 +56,7 @@ class PipelineStorage(StaticFilesStorage):
return
super
(
PipelineStorage
,
self
)
.
post_process
(
paths
,
dry_run
,
**
options
)
class
PipelineCachedStorage
(
CachedFilesMixin
,
Pipeline
Storage
):
class
PipelineCachedStorage
(
PipelineStorage
,
CachedStaticFiles
Storage
):
pass
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment