
LOCAL_APPS = (
    'django_extensions',
)

####### Django Extensions #######
# These things will be imported when you run ./manage.py shell_plus
SHELL_PLUS_POST_IMPORTS = (
    # Models
    ('corehq.apps.domain.models', 'Domain'),
    ('corehq.apps.groups.models', 'Group'),
    ('corehq.apps.locations.models', 'Location'),
    ('corehq.apps.users.models', ('CommCareUser', 'CommCareCase')),
    ('couchforms.models', 'XFormInstance'),

    # Data querying utils
    ('dimagi.utils.couch.database', 'get_db'),
    ('corehq.apps.sofabed.models', ('FormData', 'CaseData')),
    ('corehq.apps.es', '*'),
)

ALLOWED_HOSTS = ['*']
FIX_LOGGER_ERROR_OBFUSCATION = True

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'commcarehq',
        'USER': 'commcarehq',
        'PASSWORD': 'commcarehq',
        'HOST': 'localhost',
        'PORT': '5432'
    }
}

import os

LOCAL_APPS = (
    'django_extensions',
)

####### Django Extensions #######
# These things will be imported when you run ./manage.py shell_plus
SHELL_PLUS_POST_IMPORTS = (
    # Models
    ('corehq.apps.domain.models', 'Domain'),
    ('corehq.apps.groups.models', 'Group'),
    ('corehq.apps.locations.models', 'Location'),
    ('corehq.apps.users.models', ('CommCareUser', 'CommCareCase')),
    ('couchforms.models', 'XFormInstance'),

    # Data querying utils
    ('dimagi.utils.couch.database', 'get_db'),
    ('corehq.apps.sofabed.models', ('FormData', 'CaseData')),
    ('corehq.apps.es', '*'),
)

ALLOWED_HOSTS = ['*']
FIX_LOGGER_ERROR_OBFUSCATION = True

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'commcarehq',
        'USER': 'commcarehq',
        'PASSWORD': 'commcarehq',
        'HOST': 'localhost',
        'PORT': '5432'
    }
}

BOWER_PATH = os.popen('which bower').read().strip()

Use `$ which bower` by default
Use `$ which bower` by default

@benrudolph
What do you think of this approach?

+ import os
  
  LOCAL_APPS = (
      'django_extensions',
  )
  
  ####### Django Extensions #######
  # These things will be imported when you run ./manage.py shell_plus
  SHELL_PLUS_POST_IMPORTS = (
      # Models
      ('corehq.apps.domain.models', 'Domain'),
      ('corehq.apps.groups.models', 'Group'),
      ('corehq.apps.locations.models', 'Location'),
      ('corehq.apps.users.models', ('CommCareUser', 'CommCareCase')),
      ('couchforms.models', 'XFormInstance'),
  
      # Data querying utils
      ('dimagi.utils.couch.database', 'get_db'),
      ('corehq.apps.sofabed.models', ('FormData', 'CaseData')),
      ('corehq.apps.es', '*'),
  )
  
  ALLOWED_HOSTS = ['*']
  FIX_LOGGER_ERROR_OBFUSCATION = True
  
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.postgresql_psycopg2',
          'NAME': 'commcarehq',
          'USER': 'commcarehq',
          'PASSWORD': 'commcarehq',
          'HOST': 'localhost',
          'PORT': '5432'
      }
  }
  
+ BOWER_PATH = os.popen('which bower').read().strip()
+ 
Use `$ which bower` by default
## Code Before:

LOCAL_APPS = (
    'django_extensions',
)

####### Django Extensions #######
# These things will be imported when you run ./manage.py shell_plus
SHELL_PLUS_POST_IMPORTS = (
    # Models
    ('corehq.apps.domain.models', 'Domain'),
    ('corehq.apps.groups.models', 'Group'),
    ('corehq.apps.locations.models', 'Location'),
    ('corehq.apps.users.models', ('CommCareUser', 'CommCareCase')),
    ('couchforms.models', 'XFormInstance'),

    # Data querying utils
    ('dimagi.utils.couch.database', 'get_db'),
    ('corehq.apps.sofabed.models', ('FormData', 'CaseData')),
    ('corehq.apps.es', '*'),
)

ALLOWED_HOSTS = ['*']
FIX_LOGGER_ERROR_OBFUSCATION = True

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'commcarehq',
        'USER': 'commcarehq',
        'PASSWORD': 'commcarehq',
        'HOST': 'localhost',
        'PORT': '5432'
    }
}

## Instruction:
Use `$ which bower` by default
## Code After:
import os

LOCAL_APPS = (
    'django_extensions',
)

####### Django Extensions #######
# These things will be imported when you run ./manage.py shell_plus
SHELL_PLUS_POST_IMPORTS = (
    # Models
    ('corehq.apps.domain.models', 'Domain'),
    ('corehq.apps.groups.models', 'Group'),
    ('corehq.apps.locations.models', 'Location'),
    ('corehq.apps.users.models', ('CommCareUser', 'CommCareCase')),
    ('couchforms.models', 'XFormInstance'),

    # Data querying utils
    ('dimagi.utils.couch.database', 'get_db'),
    ('corehq.apps.sofabed.models', ('FormData', 'CaseData')),
    ('corehq.apps.es', '*'),
)

ALLOWED_HOSTS = ['*']
FIX_LOGGER_ERROR_OBFUSCATION = True

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'commcarehq',
        'USER': 'commcarehq',
        'PASSWORD': 'commcarehq',
        'HOST': 'localhost',
        'PORT': '5432'
    }
}

BOWER_PATH = os.popen('which bower').read().strip()
