Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7931069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:37:00+00:00 2026-06-03T20:37:00+00:00

I am trying this function, however something is wrong. I stored the name John

  • 0

I am trying this function, however something is wrong. I stored the name “John” but when i pass the john to username_ and call the check_user the output is always return results, even if the name is not stored in google data store. Why?

def check_user(self, username_):
    query = db.Query(Registrations)
    results = query.filter('username =', username_)
    if results:
        return results

user_username = self.request.get('username')
check_username_valid = self.check_user(user_username)

 if not check_username_valid:
    error_username_exists="Username already exists"

In the case of GQL, how can i pass the variable username_ into the query? like:

 qr = db.GqlQuery("Select * from Registrations Where username = ?????")
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:37:01+00:00Added an answer on June 3, 2026 at 8:37 pm

    results is the query object not the result, you need to call query.filter('username =', username_).get() to return a single result or query.filter('username =', username_).fetch() to return all of them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to execute this: function getReport(name) { $.ajax({ type: POST, url: reportAjax.php, data: name=+
I'm trying to execute this function when a select list's (LevelId0) value change but
I was trying this: $(document).ready(function () { $(.qa-a-count).appendTo(.qa-q-item-main); }); But there are a lot
Trying to make this function dynamic instead of static. This was the original code
I'm trying to get this function for making it easy to parallelize my bash
I am trying to use this function from a COM API which enables the
I'm trying to compile this function from Learn You a Haskell for Great Good
I'm trying to solve this newbie puzzle: I've created this function: def bucket_loop(htable, key):
i hope i'm just doing something wrong here. Ideally i'm trying to open the
I was trying to pass a variable that contained the name of the superglobal

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.