Skip to content

apimetta/devtusita

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Source Code for Personal Page of Tusita Hermitage

The website is powered by Google App Engine, AngularJS, Bootstrap, and Glyphicons Halflings.

Development

  • app.yaml, main.py, database.py : files on Google App Engine server(s). Written in Python programming language. These files route and handles user http requests.
  • app/* : files on client side, i.e., run on user browser. Use AngularJS to simplify development process.
    1. app/index.html : home page of the website. (The first page served when users visits the website)
    2. app/css/* : css file(s) goes here.
    3. app/js/* : JavaScript files goes here. (use AngularJS)
    4. app/img/* : image files goes here.
    5. app/partials/* : partial html files used by AngularJS.

Database

Several models are used to store data on server. The first is:

Person

class Person(ndb.Model):
  json = ndb.TextProperty()
  activeMedAppForm = ndb.KeyProperty(repeated = True)

This is a model inherited from ndb.Model to store basic information of users, such as name, birthday, and etc. There are two properties in this Person model, json and activeMedAppForm. The field json stores user information in JSON format, and the field activeMedAppForm stores key(s) of user meditation application(s). The data of user meditation application is stored in another model called MedAppForm, which will be described next.

MedAppForm

class MedAppForm(ndb.Model):
  json = ndb.TextProperty()

This models stores the user meditation application. The only one field json store the form data in JSON format.

RESTful API

The are repective API for each model:

RESTful API for Person

CRUD (create, read, update, and delete) are all supported. The url for communication is /RESTful/{{email}}, where {{email}} is the email address of the user.

RESTful API for MedAppForm

Only create and read are supported. The url is /RESTful/{{email}}/apply, where {{email}} is the email address of the user. The read operation will return all applied form(s) back to client.

About

source code for devtusita.appspot.com

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 55.0%
  • Python 45.0%