Did I find the right examples for you? yes no

All Samples(1535)  |  Call(1528)  |  Derive(0)  |  Import(7)

src/a/f/Affect-Sampler-HEAD/server/main.py   Affect-Sampler(Download)
    - for a path of /, a list of all model classnames
    """
    user = users.get_current_user()
    if user is None:
      return self.redirect(users.create_login_url(self.request.uri))
        Also sets HTTP Location: header to /classname/id for new entity.
    """
    user = users.get_current_user()
    if user is None:
      return self.redirect(users.create_login_url(self.request.uri))
        Response is JSON for a jobj for the updated entity.
    """
    user = users.get_current_user()
    if user is None:
      return self.redirect(users.create_login_url(self.request.uri))
        Response is JSON for an empty jobj.
    """
    user = users.get_current_user()
    if user is None:
      return self.redirect(users.create_login_url(self.request.uri))
    - for a path of /, a list of all model classnames
    """
    user = users.get_current_user()
    if user is None:
      return self.redirect(users.create_login_url(self.request.uri))

src/p/y/py1-HEAD/lec10/datastore_example/datastore_example.py   py1(Download)
    '''
    if not user_id:
        user = users.get_current_user()
        if not user:
            return None
    '''
    # получаем текущего пользователя
    user = users.get_current_user()
 
    # контекст для шаблона

src/p/y/py1-HEAD/lec9/gaccount_example/gaccount_example.py   py1(Download)
    def get(self):
        # получаем текущего пользователя
        user = users.get_current_user()
 
        html = ['<html><head><title>Google Accounts Test</title></head><body>']

src/g/a/gae-paypal-online-market-example-HEAD/app/util.py   gae-paypal-online-market-example(Download)
def add_user( url, dict ):
  user = users.get_current_user()
  if user:
    dict['user'] = user
    dict['user_auth_url'] = users.create_logout_url( url )

src/p/e/personis-0.933/personis/examples/aelog/oauth2client/appengine.py   personis(Download)
        return
 
      user = users.get_current_user()
      # Don't use @login_decorator as this could be used in a POST request.
      if not user:
        return
 
      user = users.get_current_user()
      # Don't use @login_decorator as this could be used in a POST request.
      if not user:
    callback = self._request_handler.request.relative_url('/oauth2callback')
    url = self.flow.step1_get_authorize_url(callback)
    user = users.get_current_user()
    memcache.set(user.user_id(), pickle.dumps(self.flow),
                 namespace=OAUTH2CLIENT_NAMESPACE)
          'The authorization request failed: %s' % errormsg)
    else:
      user = users.get_current_user()
      flow = pickle.loads(memcache.get(user.user_id(),
                                       namespace=OAUTH2CLIENT_NAMESPACE))

src/p/y/Python-lectures-HEAD/lec9/gaccount_example/gaccount_example.py   Python-lectures(Download)
    def get(self):
        # получаем текущего пользователя
        user = users.get_current_user()
 
        html = ['<html><head><title>Google Accounts Test</title></head><body>']

src/g/a/gae-paypal-online-market-example-HEAD/app/main.py   gae-paypal-online-market-example(Download)
  def post(self, command):
    user = users.get_current_user()
    if not user:
      self.redirect( users.create_login_url( "/sell" ) )
    else:
  def start_purchase(self, item):
    purchase = model.Purchase( item=item, owner=item.owner, purchaser=users.get_current_user(), status='NEW', secret=util.random_alnum(16) )
    purchase.put()
    if settings.USE_IPN:
      ipn_url = "%s/ipn/%s/%s/" % ( self.request.host_url, purchase.key(), purchase.secret )
  def get(self):
    data = {
      'profile': model.Profile.from_user(users.get_current_user())
    } 
    util.add_user( self.request.uri, data )
    path = os.path.join(os.path.dirname(__file__), 'templates/profile.htm')
    self.response.out.write(template.render(path, data))
 
  def post(self):
    profile = model.Profile.from_user( users.get_current_user() )
  def post(self):
    profile = model.Profile.from_user( users.get_current_user() )
    if profile == None:
      profile = model.Profile( owner = users.get_current_user() )
    profile.paypal_email = self.request.get('paypal_email')

src/o/h/oh-mainline-HEAD/vendor/packages/gdata/samples/oauth/oauth_on_appengine/main_rsa.py   oh-mainline(Download)
  def get(self):
    if not users.get_current_user():
      self.redirect(users.create_login_url(self.request.uri))
 
    access_token = gdocs.token_store.find_token('%20'.join(SETTINGS['SCOPES']))
      'form_action': form_action,
      'form_value': form_value,
      'user': users.get_current_user(),
      'revoke_token_link': revoke_token_link,
      'oauth_token': access_token,
 
      # Remember the access token in the current user's token store
      if access_token and users.get_current_user():
        gdocs.token_store.add_token(access_token)
      elif access_token:
    self.session = Session()
 
    if users.get_current_user():
      # 1.) REQUEST TOKEN STEP. Provide the data scope(s) and the page we'll
      # be redirected back to after the user grants access on the approval page.

src/o/h/oh-mainline-HEAD/vendor/packages/gdata/samples/oauth/oauth_on_appengine/main_hmac.py   oh-mainline(Download)
  def get(self):
    if not users.get_current_user():
      self.redirect(users.create_login_url(self.request.uri))
 
    access_token = gdocs.token_store.find_token('%20'.join(SETTINGS['SCOPES']))
      'form_action': form_action,
      'form_value': form_value,
      'user': users.get_current_user(),
      'revoke_token_link': revoke_token_link,
      'oauth_token': access_token,
 
      # Remember the access token in the current user's token store
      if access_token and users.get_current_user():
        gdocs.token_store.add_token(access_token)
      elif access_token:
    self.session = Session()
 
    if users.get_current_user():
      # 1.) REQUEST TOKEN STEP. Provide the data scope(s) and the page we'll
      # be redirected back to after the user grants access on the approval page.

src/e/n/enterprise-toolkit-HEAD/api_sample/third_party/oauth2client/appengine.py   enterprise-toolkit(Download)
        return
 
      user = users.get_current_user()
      # Don't use @login_decorator as this could be used in a POST request.
      if not user:
        return
 
      user = users.get_current_user()
      # Don't use @login_decorator as this could be used in a POST request.
      if not user:
              'The authorization request failed: %s' % _safe_html(errormsg))
        else:
          user = users.get_current_user()
          decorator._create_flow(self)
          credentials = decorator.flow.step2_exchange(self.request.params)

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next