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

  • Home
  • SEARCH
  • 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 7998639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:15:59+00:00 2026-06-04T15:15:59+00:00

Simple question: What happens to {{ STATIC_URL }} variable in deployment?. For example, if

  • 0

Simple question:

What happens to {{ STATIC_URL }} variable in deployment?. For example, if I’m using a filter like this:

@register.filter
def new_filter(g):
    from myapp import settings
    STATIC_URL = settings.STATIC_URL
    return STATIC_URL + 'dir/' + g

Am I going to have problems or Django will still point to the same STATIC_URL as it is in localhost?.

I have read the documentation but I’m still not sure about this.

Regards

  • 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-06-04T15:16:00+00:00Added an answer on June 4, 2026 at 3:16 pm

    Your filter will always point to whatever is defined in settings.STATIC_URL – end of story.

    If you change the settings for production, your filter will now point to your new STATIC_URL. If you don’t, it wont.

    If your STATIC_URL is a relative URL, your URLs will automatically resolve to the host.

    • /static/ on development might be looked up as localhost/static/
    • /static/ on production example.com the browser will attempt example.com/static/

    If it’s absolute, then well production or development the browser will read the same resource until you change STATIC_URL.

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

Sidebar

Related Questions

Simple question, How do I search multiple models using Sunspot?...I'm using Sunspot with Rails,
Simple question, simple code. This works: $x = &$_SESSION['foo']; This does not: $x =
I know this is a simple question, but I can't for the life of
From the code sample of this question , I added a string property to
A simple question. Does it happens that I still receive the registered broadcast receivers
In this question I have searched for a simple solution to unblock files. Thanks
This is quite a simple question. I can create a brand new FLA in
This is a simple question. If the content of two lambda expressions in the
This is a simple question, is it possible to view an entire list in
This is a purely theoretical question. Given three simple classes: class Base { }

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.