你好我想基礎SCSS集成到使用Django壓縮機的預編譯的Django,該項目是這樣的:Django的,壓縮機和基礎SCSS
├── manage.py
├── requirements.txt
├── static
│ ├── config.rb
│ ├── humans.txt
│ ├── index.html
│ ├── javascripts
│ │ ├── foundation
│ │ │ ├── foundation.alerts.js
│ │ │ ├── foundation.clearing.js
│ │ │ ├── foundation.cookie.js
│ │ │ ├── foundation.dropdown.js
│ │ │ ├── foundation.forms.js
│ │ │ ├── foundation.joyride.js
│ │ │ ├── foundation.js
│ │ │ ├── foundation.magellan.js
│ │ │ ├── foundation.orbit.js
│ │ │ ├── foundation.placeholder.js
│ │ │ ├── foundation.reveal.js
│ │ │ ├── foundation.section.js
│ │ │ ├── foundation.tooltips.js
│ │ │ └── foundation.topbar.js
│ │ └── vendor
│ │ ├── custom.modernizr.js
│ │ ├── jquery.js
│ │ └── zepto.js
│ ├── MIT-LICENSE.txt
│ ├── robots.txt
│ ├── sass
│ │ ├── app.scss
│ │ ├── normalize.scss
│ │ └── _settings.scss
│ └── stylesheets
│ ├── app.css
│ └── normalize.css
├── templates
│ ├── 404.html
│ ├── 500.html
│ ├── admin
│ │ └── base_site.html
│ └── base.html
└── weddings
├── __init__.py
├── __init__.pyc
├── local_settings.py
├── local_settings.pyc
├── settings.py
├── settings.pyc
├── urls.py
├── urls.pyc
└── wsgi.py
和預編譯器看起來像這樣在settings.py
COMPRESS_PRECOMPILERS = (
('text/x-scss', 'sass --scss --compass {infile} {outfile}'),
)
當我nginx的+ uwsgi運行它,我得到以下錯誤:
Syntax error: File to import not found or unreadable: foundation/foundation-global.
Load paths:
/etc/uwsgi/vassals
/etc/uwsgi/vassals/sass
/srv/www/weddings/gems/compass-0.12.2/frameworks/blueprint/stylesheets
/srv/www/weddings/gems/compass-0.12.2/frameworks/compass/stylesheets
Compass::SpriteImporter
/srv/www/weddings/gems/bourbon-3.1.1/app/assets/stylesheets
/srv/www/weddings/gems/bourbon-3.1.1/app/assets/stylesheets
on line 2 of /srv/www/weddings/weddings/static/sass/_settings.scss
from line 2 of /srv/www/weddings/weddings/static/sass/app.scss
Use --trace for backtrace.
我懷疑這是不是讀config.rb或config.rb的設置是錯誤的:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"
謝謝,茅塞頓開了一下,關於你推薦的硬編碼路徑其實我使用你推薦什麼'(「文本/ X-SCSS」,「CD {0}/static && sass --scss --compass --require bourbon.rb {{infile}} {{outfile}}'.format(PROJECT_ROOT)),'我認爲顯示實際路徑在這裏更具可讀性。 – 2013-03-24 22:03:38
偉大的工作!不要忘記upvote。 ;) – 2013-03-25 13:50:11