0
votes
1answer
365 views

TypeError: bad operand type for unary -: 'DateTimeProperty'

I am using Google App Engine with python 2.7 and try to reproduce the example given at https://github.com/GoogleCloudPlatform/appengine-paging-python/blob/master/suggest_cursor.py to use paging with ...
0
votes
1answer
33 views

How to do advanced list modelling and matching in MongoDB

I'm building a university course search application and my data contains a pre-requisites field I need to match. It looks like this: "Any English, Chemistry, Methods or Specialist Maths" If I was ...
2
votes
2answers
65 views

How to determine the child model of a polymodel entity on GAE?

That's how I query for contacts: contacts = Contact.all() Then, how to determine if a Contact is a Person or a Company with the following structure? class Contact(polymodel.PolyModel): ...
0
votes
1answer
166 views

Python Parent Child Relationships in Google App Engine Datastore

I am trying to model a parent hierarchy relationship in Google App Engine using Python. For example, I would like to model fruit. So the root would be fruit, then a child of fruit would be ...
0
votes
1answer
309 views

Overwrite in datastore using python for GAE - Guestbook Example

I want to do something very similar to the Guestbook example GAE provides in Python. But instead allowing one user to sign multiple times, I want each submission to overwrite any preexisting one by ...
6
votes
1answer
89 views

Is there any way or any framework in python to create an object model from a xml?

for example my xml file contains : <layout name="layout1"> <grid> <row> <cell colSpan="1" name="cell1"/> </row> <row> ...
2
votes
2answers
307 views

NDB using Users API to form an entity group

I'm trying to wrap my head around what seems to be a very simple use case, but I seem to be failing miserably. The goal of the exercise is to look up a set of records for the user that logs in using ...
1
vote
1answer
1k views

SQLAlchemy One-to-Many relationship on single table inheritance - declarative

Basically, I have this model, where I mapped in a single table a "BaseNode" class, and two subclasses. The point is that I need one of the subclasses, to have a one-to-many relationship with the other ...
1
vote
2answers
370 views

How do I correctly model joined table inheritance with discriminator based on Role in SQLAlchemy

Is it possible to specify a discriminator column from another table? How do I do this with Declarative? The reason for this is I have a joined table inheritance with class User(Base): id = ...
2
votes
6answers
153 views

How do you model a state with three values?

I have something which can be in three states (say) Open, Closed, Running I will try to model it via one of the two ways, is_open = Boolean(default=False) is_running = Boolean(default=False) and ...
0
votes
1answer
237 views

Python - Data modeling/forecasting?

(I'm using python 3.2) Anyone has any idea how to go about this problem I've thought up? I don't even know if it's possible in python, but anyway. Basically I want to give python some data to look ...
0
votes
3answers
85 views

Please help me design a database schema for this:

I'm designing a python application which works with a database. I'm planning to use sqlite. There are 15000 objects, and each object has a few attributes. every day I need to add some data for each ...
2
votes
2answers
377 views

Google App Engine using UserProperty to link data

I am writing an application in GAE. In order to link the currently logged in user to data in my application I have been relying on equality between users.get_current_user() and members.user (see ...
1
vote
1answer
124 views

Is there a “children” method in App Engine?

When entities with a parent are created, they can always reference this parent by calling the parent() method in Python. Does the parent have a corresponding children() method? I didn't see one in ...
0
votes
1answer
379 views

Is there any database model designer that can output SQLAlchemy models?

I am implementing a database model to store the 20+ fields of the iCal calendar format and am faced with tediously typing in all these into an SQLAlchemy model.py file. Is there a smarter approach? ...
0
votes
3answers
84 views

How can I represent this in a Django model?

I'm having trouble working out what the relationships should be with this: class Airport(models.Model): airlines = models.ManyToManyField(Airline) class Airline(models.Model): terminal = ...
0
votes
1answer
38 views

Archives for Model in python to appengine

I'm a noob in python, and i'm creating a app into appengine with python. I define class form Model's bug i don't know how order archives, normally, i create diferrent archives with all entities of my ...
3
votes
1answer
167 views

How to count both sides of many-to-many relationship in Google App Engine

Consider a GAE (python) app that lets users comment on songs. The expected number of users is 1,000,000+. The expected number of songs is 5,000. The app must be able to: Give the number of songs ...
2
votes
2answers
315 views

Data modeling advice for a forum application on Google App Engine

I'm writing a simple forum-like application on Google App Engine and trying to avoid scalability issues. I'm new to this non-RBDMS approach, i'd like to avoid pitfalls from the beginning. The forum ...
1
vote
3answers
1k views

Python data structure/object to model static multidimensional table

I'm just getting back into coding after a few year hiatus and I'm trying to model multi-tiered static forms in a way that lets me grab and perform operations on a specific form level or an entire ...
5
votes
4answers
844 views

Thinking in AppEngine

I'm looking for resources to help migrate my design skills from traditional RDBMS data store over to AppEngine DataStore (ie: 'Soft Schema' style). I've seen several presentations and all touch on the ...
0
votes
1answer
116 views

How do I get all the entities of a type with a required property in Google App Engine?

I have a model which has a required string property like the following: class Jean(db.Model): sex = db.StringProperty(required=True, choices=set(["male", "female"])) When I try calling ...