Hello All,
Please I am new here. I am trying to store hashtags that I extracted from a
post in my application to the datastore.
In the python interpreter, I was able to define a procedure that extracts
the hashtags and return them as strings. If I print keyword(content), it
will return all the hashtags in the post. BUT I CANNOT PUT THEM IN THE
DATASTORE.
I have this:
content = self.request.get('content')
keyword = keyword(content) # The procedure extracting hashtags
if content and keyword:
c = Post(parent = blog_key(), content = content, keyword=keyword)
c.put()
self.redirect('/')
else:
error = "Please make a commendation with a hashtag inclusive."
self.render_commendations(content, error)
class Post(db.Model):
content = db.TextProperty(required = True)
keyword = db.StringProperty(required = True)
created = db.DateTimeProperty(auto_now_add = True)
I don't want to use another form element like text field to collect the
keywords. I need just one form element, the textarea, then use it to
collect contents and extract the keywords (hashtags) from there too. I want
to be keeping track of the keywords.
Similar to what I want to implement is WHAT IS TRENDING IN twitter.
Thank you.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-appengine/-/jjCLqmKDR14J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.