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 6840825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:53:29+00:00 2026-05-26T23:53:29+00:00

Here is what I do: class Person(db.Model): first_name = db.StringProperty() last_name = db.StringProperty() middle_name

  • 0

Here is what I do:

class Person(db.Model):  
  first_name = db.StringProperty()
  last_name = db.StringProperty()
  middle_name = db.StringProperty()
  ...
  photo = db.BlobProperty()

person = Person.get_by_key_name(person_key_name)
if person == None or not person.photo:
  self.response.set_status(404, 'Not Found')
  return      
self.response.headers['Content-Type'] = "image/png"
self.response.out.write(person.photo)

Shouldn’t I use SELECT with just one field (photo) instead of get_by_key_name?

  • 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-05-26T23:53:30+00:00Added an answer on May 26, 2026 at 11:53 pm

    No.

    GQL is not SQL. There is no way of doing a SELECT query with “just one field” – you can only do either SELECT * or SELECT __key__.

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

Sidebar

Related Questions

Here is a Django model I'm using. class Person(models.Model): surname = models.CharField(max_length=255, null=True, blank=True)
Here's part of my Django app's models.py : class Person(models.Model): birth_year = WideYear(null=True, blank=True)
Here is a model: Public class Person { [Key] Public int PersonId { get;
Here is some code: class Person def initialize(age) @age = age end def age
Here is the domain that I wish to have: public class Person { public
For the sake of argument, here's a simple person class public class Person :
I don't know what this is called but here goes. public class Person {
I have a Django model with a Person model: class Person(models.Model): # Personal details
I've my Model something maybe like this : public class Person { public virtual
I have a Rails model called Person which has database table columns for first_name

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.