parameters: (user=None)
return_statement: return template.replace('{% key %}', data[0]) \
                      .replace('{% token %}', data[1]) \
                      .replace('{% scope %}', ' '.join(data[2]))
docstring: A simple tag that stores verification data for Google
docstring_summary: A simple tag that stores verification data for Google
docstring_tokens: A simple tag that stores verification data for Google
function: def google_data(user=None):
      """ A simple tag that stores verification data for Google """
      if user is None or user.is_anonymous(): return ''
      template = """<script>
          window.GOOGLE_DATA = {
              access_token: "{% token %}",
              client_id: "{% key %}",
              plus_scope: "{% scope %}",
              plus_id: "{% key %}"
          };
      </script>"""
      try:
          us = UserSocialAuth.objects.get(user=user, provider='google-plus')
          data = (
              settings.SOCIAL_AUTH_GOOGLE_PLUS_KEY,
              us.extra_data['access_token'],
              settings.SOCIAL_AUTH_GOOGLE_PLUS_SCOPE,
          )
      except UserSocialAuth.DoesNotExist:
          data = ('','','')
      return template.replace('{% key %}', data[0]) \
                      .replace('{% token %}', data[1]) \
                      .replace('{% scope %}', ' '.join(data[2]))
function_tokens: def google_data ( user = None ) : if user is None or user . is_anonymous ( ) : return '' template = """<script>
          window.GOOGLE_DATA = {
              access_token: "{% token %}",
              client_id: "{% key %}",
              plus_scope: "{% scope %}",
              plus_id: "{% key %}"
          };
      </script>""" try : us = UserSocialAuth . objects . get ( user = user , provider = 'google-plus' ) data = ( settings . SOCIAL_AUTH_GOOGLE_PLUS_KEY , us . extra_data [ 'access_token' ] , settings . SOCIAL_AUTH_GOOGLE_PLUS_SCOPE , ) except UserSocialAuth . DoesNotExist : data = ( '' , '' , '' ) return template . replace ( '{% key %}' , data [ 0 ] ) . replace ( '{% token %}' , data [ 1 ] ) . replace ( '{% scope %}' , ' ' . join ( data [ 2 ] ) )