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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:23:59+00:00 2026-05-27T08:23:59+00:00

I am trying to make a basic quotation-sharing app using Webapp. Obviously it is

  • 0

I am trying to make a basic quotation-sharing app using Webapp. Obviously it is crucial to be able to give arbitrary tags to each quote.

So here are the relevant code that I’ve come up with:
(Mostly from the example chat app in the great introductory book ‘Using Google App Engine‘ )

class Quote(db.Model):
  user = db.ReferenceProperty()
  text = db.StringProperty()
  tags = db.StringListProperty()
  created = db.DateTimeProperty(auto_now=True)

And the ‘view’:

class QuoteHandler(webapp.RequestHandler):

  def get(self):
    que = db.Query(Quote).order('-created');
    chat_list = que.fetch(limit=10)
    doRender(
          self,
          'quote.htm',
          { 'quote_list': quote_list })

  def post(self):
    self.session = Session()
    if not 'userkey' in self.session:
      doRender(self, 'quote.htm', {'error' : 'Must be logged in'} )
      return

    msg = self.request.get('message')
    if msg == '':
      doRender(self,'quote.htm',{'error' : 'Blank quote ignored'} )
      return
    tgs = self.request.get('tags') #really not sure of this
    newq = Quote(user = self.session['userkey'], text=msg, tags= tgs)
    newq.put();
    self.get();

And in quote.htm I have:

{% extends "_base.htm" %}
{% block bodycontent %}
      <h1>Quotes</h1>
      <p>
      <form method="post" action="/quote">
        Quote:<input type="text" name="message" size="60"/><br />
        Tags: <input type="text" name="tags" size="30"/>
      <input type="submit" value="Send"/> 
      </form>
      </p>
      {% ifnotequal error None %}
       <p>
       {{ error }}
       </p>
      {% endifnotequal %}
<br />
<h3> The latest quotes </h3>

      {% for quote in quote_list %}
        <p>
           {{ quote.text }}<br />
         ({{quote.user.account}}) <br />
         {{ quote.tags }}

           {{ quote.created|date:"D d M Y" }}
        </p>
      {% endfor %}
{% endblock %}

However, this combo is faulty. I get:

BadValueError: Property tags must be a list

No matter what I enter in the tags filed, and (obviously) I am new to both Python and Webapp. I googled a lot but could not find any guide to implement tags. So I really appreciate your help to fix this error, or rather point me to a a more elegant way to deal with tags.

  • 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-27T08:24:00+00:00Added an answer on May 27, 2026 at 8:24 am

    Try using split() to turn tgs into a list of words before creating your Quote. Tags should be separated by whitespace in your form, otherwise you can add an argument to split if you’d rather separate them by something else.

    ...
    tgs = self.request.get('tags').split()
    newq = Quote(user = self.session['userkey'], text=msg, tags= tgs)
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to figure out how make a basic GET request using Network.HTTP.simpleHTTP that
I'm just trying to make the basic Selenium2Example work with Firefox 4 using Maven
I am trying to learn to make a basic game using pygame. I want
I'm trying to make a basic client-server application for windows phone 7 (using Mango
I am trying to make a basic iphone app that shows nearby tweets. I
So I'm currently trying to make a project using ravendb. And some basic moving
I am trying to make a basic webclient call to get an xml stream
I'm trying to make a basic drop down menu with animate and am running
I'm trying to make a basic application that displays an image from the camera,
I was hacking around trying to make a basic orm that has support for

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.