How to attach multiple images to a blog post?

121 views
Skip to first unread message

ecir...@gmail.com

unread,
Jan 31, 2008, 12:23:09 PM1/31/08
to Django users
Hello,
I'm trying to write simple blog tool but I ran into some problems. I
would like to attach multiple images to a post. Here's my models:

class Entry(models.Model):
title = models.CharField(max_length=200)
date = models.DateTimeField(auto_now=True)
body = models.TextField()

class Photo(models.Model):
entry = models.ForeignKey(Entry, edit_inline=models.TABULAR,
num_in_admin=10)
photo = models.ImageField(upload_to='photos/%Y/%m/%d', core=True,
blank=True)

Now, when I create very new Entry via admin, I can add 10 images, ok.
So I add some. Then, when I would like to add another ones or to
change the ones already in, it goes wild: all the pictures are deleted
and it is not even possible to add anything. Please, any help?

I read somewhere that perhaps edit_inline is broken or something, is
there another way how to attach multiple images to a post via admin?

Thanks!

ecir...@gmail.com

unread,
Feb 1, 2008, 5:41:52 AM2/1/08
to Django users
Reply all
Reply to author
Forward
0 new messages