Skip to content

Instantly share code, notes, and snippets.

@grudelsud
Created December 4, 2013 17:55
Show Gist options
  • Save grudelsud/7792287 to your computer and use it in GitHub Desktop.
Save grudelsud/7792287 to your computer and use it in GitHub Desktop.
class ClubNight(BaseModel):
"""club nights are series of events and organized by someone. e.g. 'don't look back'"""
name = ndb.StringProperty()
content = ContentProperty(ndb.TextProperty)
blob_key_logo = ContentProperty(ndb.BlobKeyProperty, verbose_name='Club night logo')
genre = ndb.KeyProperty(kind='Genre')
website = ContentProperty(ndb.StringProperty)
address = ContentProperty(ndb.TextProperty)
location = ContentProperty(ndb.GeoPtProperty)
class Connection(ndb.Model):
"""generic connection between entities"""
from_key = ndb.KeyProperty()
to_key = ndb.KeyProperty()
to_name = ndb.StringProperty()
to_kind = ndb.StringProperty()
to_slug = ndb.StringProperty()
to_genre_colour = ndb.StringProperty()
to_image = ndb.BlobKeyProperty()
to_popularity = ndb.IntegerProperty()
is_published = ndb.BooleanProperty()
is_public = ndb.BooleanProperty(default=False)
is_featured = ndb.BooleanProperty(default=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment