Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7190781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:35:21+00:00 2026-05-28T19:35:21+00:00

I just changed my storage backend to Amazon S3, and I realized that my

  • 0

I just changed my storage backend to Amazon S3, and I realized that my background was not loading for my site. I looked and realized that in my CSS (SASS actually) I had specified the background URL (static/mysite/images/background.gif).

I am wondering how I should fix this problem. Of course I could just change it to my new static URL, but that seems like a bad practice. So i tried loading my background image, with {{ STATIC_URL }}, in my body HTML, but then it renders my background first, before the repeat: no-repeat; renders on my actual CSS, causing the background to repeat across the whole screen while the CSS loads. Anyway I don’t like mixing my styles into my document.

So what is the best way to provide a relative path for a background image in Django? Should I set up my CSS as a template, and direct to it through a view? That also seems messy.

Or should I just forget about making it static_url agnostic, and just hard code the thing in my CSS?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T19:35:22+00:00Added an answer on May 28, 2026 at 7:35 pm

    Django compressor!

    It lets you render snippets of CSS directly inside your template that are ultimately combined into a single file OR you can even specify options to enable parsing of your CSS files with django’s template engine and context:
    http://django_compressor.readthedocs.org/en/latest/settings/#django.conf.settings.COMPRESS_CSS_FILTERS

    It’s amazing and worth the trouble as you don’t need to think about performance when managing CSS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I just changed the PageControl project from Apple's site here . The issue
I changed the code shown below into ARC compatible. I just changed it as
I want to workaround the Webpage has expired issue. First, I just changed a
I just enabled Failed Request Tracing for a site and I get a URL_CHANGED
I have just installed a new ssl certificate on GlassFish 3. I also changed
Short: how are the keys changed when migrating to HR. Does just the App
I'm attempting to just change the background colour of a webpage upon page load.
I haven't really ever done a background navigation rollover, I usually just change the
I'm struggeling with writing to the isolated storage in my background task. The reason
I have a web app that populates user page history into the local storage.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.