sketch of models for UE

2 views
Skip to first unread message

mark gross

unread,
Jul 24, 2009, 1:14:20 AM7/24/09
to urbanedi...@googlegroups.com
The following is a supper early cut at a model.py file for the UE application.

Its really a bunch of comments, but you can see what I'm thinking
about and give some feed back before I code it up to the point where
the admin site works with the fields.

Please have a look and make comments

thanks!

--mgross

--------models.py--------------
from django.db import models

# Create your models here.

class EdibleType(modles.Model):
# common name
# formal name
# edibility
# region / Climate zone.
# Season info (typical start, typical end)
# media location for photo
# identification info
# harvesting info
# preparation info
# preserving (storing) info


class User(modles.Model):
# name
# email
# alias


class MedicalUse(models.Model):
# EdibleType foreign key
# use text field
# user foreign key


class Edible(models.Model):
# loc import model from geodjango
# Street address import model from open-streetmaps or google or
some such thing
# user foreign key
# permissions for anonymous access to edible
# type foreign key
# time of submission


class Comment (models.Model):
# submitter (User) foreign key
# time
# comment field
# Edible foreign key
# rating field (int)
# URL


class CommentPhoto (models.Model):
# media location
# Comment foreign key


class Recipe(models.Model):
# (Edible, amount) tuple list of foreign keys
# Cooking instructions
# Photo Media location


class RecipePhoto (modles.Model):
# media location
# submitter (User) foreign key
# Recipe

Reply all
Reply to author
Forward
0 new messages