title: django templates inline CSS
body: <p>I want to create a set of widgets (tables, calendars, etc) that can be include in HTML emails we send out via Mandrill. I already have these widgets build as components pulled into web pages, I would like to reuse them in emails but in order to do that I need to inline the CSS.</p>
  
  <p>I have tried using <a href="https://github.com/roverdotcom/django-inlinecss" rel="nofollow">https://github.com/roverdotcom/django-inlinecss</a>, which appears to do what I want but doesn't appear to support S3 as a staticfiles source and I can't get it to run locally. Using the tag {% inlinecss "/css/main.css" %} gives an error:</p>
  
  <p>"The joined path (/css/main.css) is located outside of the base path component ([my local path]/static)" from the contrib.staticfile.find_location call to safe_join.</p>
  
  <p>Question 1: can I use django-inlinecss with S3 as a staticfiles repo as it stands or would I have to fork and enhance it?</p>
  
  <p>Question 2: if 1 is possible, what do I need to do to get django-inlinecss running successfully locally?</p>
  
  <p>Question 3: if 1 is not possible does anyone have any alternative suggestions for inlining css using the django tempting framework.</p>
  
  <p>Thanks in advance - Guy.</p>