Skip to content

Instantly share code, notes, and snippets.

@cacheleocode
Created July 10, 2015 20:22
Show Gist options
  • Select an option

  • Save cacheleocode/72661094eab5e8b387cc to your computer and use it in GitHub Desktop.

Select an option

Save cacheleocode/72661094eab5e8b387cc to your computer and use it in GitHub Desktop.
almost...
if currentDomain == 'stage.discovernikkei.org':
if profile.picture.name.find('sites/stage.discovernikkei.org.nikkeialbum/files/pictures'):
profile.picture = profile.picture.name.replace(
'sites/stage.discovernikkei.org.nikkeialbum/files/pictures',
'accounts/%s' % profile.user.username)
else:
if profile.picture.name.find('sites/www.discovernikkei.org.nikkeialbum/files/pictures'):
profile.picture = profile.picture.name.replace(
'sites/www.discovernikkei.org.nikkeialbum/files/pictures',
'accounts/%s' % profile.user.username)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment