git.ithinksw.org
/
~kgodey
/
maayanwich.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
799a2ef
)
Edited Sandwich model to have a Patron and a user. Added form stuff to views.py.
author
Kriti Godey
<kriti.godey@gmail.com>
Fri, 26 Feb 2010 19:41:14 +0000
(14:41 -0500)
committer
Kriti Godey
<kriti.godey@gmail.com>
Fri, 26 Feb 2010 19:41:14 +0000
(14:41 -0500)
models.py
patch
|
blob
|
history
views.py
patch
|
blob
|
history
diff --git
a/models.py
b/models.py
index
5d371e3
..
768d898
100644
(file)
--- a/
models.py
+++ b/
models.py
@@
-26,9
+26,11
@@
class Sandwich(models.Model):
date_made = models.DateField()
date_added = models.DateTimeField(default=datetime.datetime.now, editable=False)
artist = models.ForeignKey(Artist)
date_made = models.DateField()
date_added = models.DateTimeField(default=datetime.datetime.now, editable=False)
artist = models.ForeignKey(Artist)
+ patron = models.CharField(max_length=200)
ingredients = models.ManyToManyField(Ingredient)
picture = models.ImageField(upload_to='sandwiches/')
notes = models.TextField()
ingredients = models.ManyToManyField(Ingredient)
picture = models.ImageField(upload_to='sandwiches/')
notes = models.TextField()
+ user = models.ForeignKey(User)
class Meta:
ordering = ['date_added']
class Meta:
ordering = ['date_added']
diff --git
a/views.py
b/views.py
index
66aa2bb
..
a56e4ec
100644
(file)
--- a/
views.py
+++ b/
views.py
@@
-7,8
+7,8
@@
def add_sandwich(request):
def add_artist(request):
def add_artist(request):
-
s
form = ArtistForm()
+
a
form = ArtistForm()
def add_ingredient(request):
def add_ingredient(request):
-
s
form = IngredientForm()
\ No newline at end of file
+
i
form = IngredientForm()
\ No newline at end of file