from django.conf import settings

SETTINGS_TO_ADD = (
    'GOOGLE_ANALYTICS_ACCOUNT',
    'SOURCE_HINTS',
)

def add_settings(request):
    """Add some selected settings values to the context"""
    
    return {
        'settings': {
            k: getattr(settings, k) for k in SETTINGS_TO_ADD
        }
    }

from django.conf import settings

SETTINGS_TO_ADD = (
    'GOOGLE_ANALYTICS_ACCOUNT',
    'SOURCE_HINTS',
    'MEDIA_URL',
)

def add_settings(request):
    """Add some selected settings values to the context"""
    
    return {
        'settings': {
            k: getattr(settings, k) for k in SETTINGS_TO_ADD
        }
    }

Make sure MEDIA_URL is available in the context of every template
Make sure MEDIA_URL is available in the context of every template

  from django.conf import settings
  
  SETTINGS_TO_ADD = (
      'GOOGLE_ANALYTICS_ACCOUNT',
      'SOURCE_HINTS',
+     'MEDIA_URL',
  )
  
  def add_settings(request):
      """Add some selected settings values to the context"""
      
      return {
          'settings': {
              k: getattr(settings, k) for k in SETTINGS_TO_ADD
          }
      }
  
Make sure MEDIA_URL is available in the context of every template
## Code Before:
from django.conf import settings

SETTINGS_TO_ADD = (
    'GOOGLE_ANALYTICS_ACCOUNT',
    'SOURCE_HINTS',
)

def add_settings(request):
    """Add some selected settings values to the context"""
    
    return {
        'settings': {
            k: getattr(settings, k) for k in SETTINGS_TO_ADD
        }
    }

## Instruction:
Make sure MEDIA_URL is available in the context of every template
## Code After:
from django.conf import settings

SETTINGS_TO_ADD = (
    'GOOGLE_ANALYTICS_ACCOUNT',
    'SOURCE_HINTS',
    'MEDIA_URL',
)

def add_settings(request):
    """Add some selected settings values to the context"""
    
    return {
        'settings': {
            k: getattr(settings, k) for k in SETTINGS_TO_ADD
        }
    }
