Killer Web Development

by Marco Laspe

3.1 Planning the pitch app

Our pitch will consists of two entities: users and posts.

Modeling users

Our user model will contain:

  • an unique id
  • a first_name
  • a last_name
  • an email address and
  • a password

(Actually it will contain also an registration_key and a reset_password_key, but we don't need to know that.)

Modeling posts

Our post model is even simpler, it contains:

  • an unique id
  • the content of the post and
  • an user_id of the user who wrote the post

The relationship between users and posts

As you might guess, the two models have a certain relationship. A user can write 0 to an infinite_number of posts. A post is written or owned by one user.

web2py pitch web application model


Books often read by web2py and Python experts:

Comments

Leave a Reply

Required fields are marked *.