Did I find the right examples for you? yes no

All Samples(44)  |  Call(44)  |  Derive(0)  |  Import(0)

src/o/p/openradar-HEAD/main.py   openradar(Download)
  def get(self):    
    user = users.GetCurrentUser()
    if not user:
        page = memcache.get(self.request.path)
        if page:
  def get(self):
    user = users.GetCurrentUser()
    # we keep request-by-id in case there are problems with the radar number (accidental duplicates, for example)
    id = self.request.get("id")
    if id:
  def get(self):    
    user = users.GetCurrentUser()
    if (not user):
      self.respondWithTemplate('please-sign-in.html', {'action': 'edit Radars'})
    else:
  def post(self):
    user = users.GetCurrentUser()
    if (not user):
      self.respondWithTemplate('please-sign-in.html', {'action': 'edit Radars'})
    else:
  def get(self):
    user = users.GetCurrentUser()
    id = self.request.get("id")
    radar = Radar.get_by_id(int(id))
    if (not user):

src/k/u/kumo-HEAD/kumo.py   kumo(Download)
    values = {
      'request': self.request,
      'user': users.GetCurrentUser(),
      'account_url_pretext': account_greeting,
      'account_url': url,

src/o/p/openradar-HEAD/openradar/handlers.py   openradar(Download)
      'debug': self.request.get('debug'),
      'application_name': 'Open Radar',
      'user': users.GetCurrentUser(),
      'login_url': users.CreateLoginURL(self.request.uri),
      'logout_url': users.CreateLogoutURL('http://' + self.request.host + '/'),
            if apikey:
                return apikey.user
    return users.GetCurrentUser()
 
 

src/s/i/Simple-On-App-Engine-HEAD/request.py   Simple-On-App-Engine(Download)
                        'application_name': 'my info', 
                        'users': users, 
                        'user' : users.GetCurrentUser(), 
                        'is_admin':users.is_current_user_admin(),
                        'url':url, 

src/t/a/talk.org-HEAD/controllers/posts.py   talk.org(Download)
def index(request):
  """Request / -- show all posts."""
  user = users.GetCurrentUser()
  posts = Post.CachedGqlToHash("latest_posts","ORDER BY created DESC LIMIT 20")
 
def create(request):
  """Create a post.  GET shows a blank form, POST processes it."""
 
  user = users.GetCurrentUser()
  if user is None:
def show(request,key):
  """Request / -- show all posts."""
  user = users.GetCurrentUser()
  try:
    post=Post.get(db.Key(unquote(key)))
def edit(request, key):
  """Edit a post.  GET shows a blank form, POST processes it."""
  user = users.GetCurrentUser()
  if user is None:
    return http.HttpResponseForbidden('You must be signed in to add or edit a post')
def destroy(request, key):
  user = users.GetCurrentUser()
  if user is None:
    return http.HttpResponseForbidden('You must be signed in to add or edit a post')
 

src/c/o/CollabQ-HEAD/common/context_processors.py   CollabQ(Download)
def gaia(request):
  try:
    gaia_user = users.GetCurrentUser()
    gaia_login = users.CreateLoginURL(request.META['PATH_INFO'])
    gaia_logout = users.CreateLogoutURL('/logout')

src/j/a/jaikuenginepatch-HEAD/common/context_processors.py   jaikuenginepatch(Download)
def gaia(request):
  try:
    gaia_user = users.GetCurrentUser()
    gaia_login = users.CreateLoginURL(request.META['PATH_INFO'])
    gaia_logout = users.CreateLogoutURL('/logout')

src/j/a/JaikuEngine-HEAD/common/context_processors.py   JaikuEngine(Download)
def gaia(request):
  try:
    gaia_user = users.GetCurrentUser()
    gaia_login = users.CreateLoginURL(request.META['PATH_INFO'])
    gaia_logout = users.CreateLogoutURL('/logout')

src/g/a/gae-dj-HEAD/main.py   gae-dj(Download)
def authmod(modname,d=None):
    user = users.GetCurrentUser()
    mod = memcache.get('modinfo:'+modname)
    if mod is None:
        mod = Modinfo.all().filter('djname =',modname)
def handle_post(request):
    user = users.GetCurrentUser()
    data = request.get('data','{}')
    data = simplejson.loads(data)
    modname = request.paras[1]
def handle_view(request):
    user = users.GetCurrentUser()
    paras = request.paras
    op = request.get('op',None)
    modname = paras[1]
def handle_model(request):
    user = users.GetCurrentUser()
    modname = request.paras[1]
    info = authmod(modname)
    #logging.info(info)
    def get(self):
        user = users.GetCurrentUser()
        name = user and user.nickname() or ''
        loginurl = 'http://'+os.environ['HTTP_HOST']
        self.jsout({'user':name,'loginurl':loginurl})

src/o/p/openradar-HEAD/openradar/models.py   openradar(Download)
  def editable_by_current_user(self):
    from google.appengine.api import users
    user = users.GetCurrentUser()
    return user == self.user or users.is_current_user_admin()
 

  1 | 2  Next