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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:30:41+00:00 2026-06-01T13:30:41+00:00

I am using appengine, webapp2 framework. I have the following model: class Match(db.Model): date_time

  • 0

I am using appengine, webapp2 framework.
I have the following model:

class Match(db.Model):
    date_time = db.DateTimeProperty()
    team1 = db.StringProperty()
    team2 = db.StringProperty()
    venue = db.StringProperty()
    result = db.IntegerProperty()

Now on the client side, an event makes a post request to one of my views, based on that post request, i want to send json data which easily readable by jQuery/javascript.

What would be the best way of doing it?

  • 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-01T13:30:43+00:00Added an answer on June 1, 2026 at 1:30 pm

    in the models:

    class DictModel(db.Model):
        def to_dict(self):
           return dict([(p, unicode(getattr(self, p))) for p in self.properties()])
    
    
    class Match(DictModel):
        date_time = db.DateTimeProperty()
        team1 = db.StringProperty()
        team2 = db.StringProperty()
        venue = db.StringProperty()
        result = db.IntegerProperty()
    

    and in the views:

    import json
    self.response.out.write(json.dumps([m.to_dict() for m in matches]))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a model like this: class Group(db.Model): name = db.StringProperty() description = db.TextProperty()
I'm using the appengine webapp framework ( link ). Is it possible to add
I am uisng webapp2 on google app engine my database model has the following
I am using google-app-engine webapp, part of the code is : class Post(db.Model): title
I have db.Model which has several properties as described below: class Doc(db.Model): docTitle =
I am using AppEngine with the webapp framework (python). In my script I am
I am using the webapp2 framework on Google App Engine, and I'm getting a
I'm developing software on google app engine. I'm using the webapp framework. is there
while using the appengine sdk i can't view the Output of my System.out.println statements
I'm using Google appengine for developing an web application that is meant to be

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.