2

I'm practicing writing glasswares for Google glass based on python quick start project. I'd like to collect some extra app specific data from the user and store them in database.

  1. How could I achieve that? There is a model.py in the main directory of the base code but I'm not sure whether that is the right place or not.
  2. Can I use ndb?
J Wang
  • 2,075
  • 1
  • 20
  • 26
Babu
  • 2,548
  • 3
  • 30
  • 47

2 Answers2

2

I store user-specific fields on Parse.com.

See the code for my app Glass To Phone: https://github.com/dannyroa/glasstophone-django.

It's built using Python/Django with Parse as database backend.

Here's the part where I store the refresh_token to Parse: https://github.com/dannyroa/glasstophone-django/blob/master/google/views.py#L97.

dannyroa
  • 5,501
  • 6
  • 41
  • 59
1

The example code is an AppEngine project, and model.py is indeed the place to put your model code. You'll see there is already a model there that keeps track of your authentication credentials. The ndb should work perfectly fine.

Jude Osborn
  • 1,788
  • 16
  • 24