I am having a problem saving in Admin.
I have two models, Picture and Post. (One to Many)
The picture model has a foreign_key (post) which is using edit_inline.

When I add a post in Admin,  the  4 picture field show up like they
are suppose to.
Then, I hit the save buttton, and none of the pictures are saved.



Does anyone have an idea of what I may be doing wrong?

Thanks
Jules

============================================
from django.db import models
from connect.post.models import Post
from nesh.thumbnail.field import ImageWithThumbnailField

class Picture(models.Model):
    post = models.ForeignKey(Post, blank=True,
edit_inline=models.TABULAR, num_in_admin=4)

    photo = ImageWithThumbnailField(upload_to='photos/',
width_field="320", height_field="240", auto_rename=False, blank=True,
core=True)
    created = models.DateTimeField(auto_now_add=True,editable=False,
core=True)
    last_modified = models.DateTimeField(auto_now=True,editable=False,
core=True)

    def __str__(self):
        return "%s" % (self.photo)
----------------------------------------------------------------------------------------
class Post(models.Model):
    title = models.CharField(maxlength=70)
    description = models.TextField('Description')
    email_address = models.EmailField('Email')
    created = models.DateTimeField(auto_now_add=True,editable=False)
    last_modified = models.DateTimeField(auto_now=True,editable=False)
    expire = models.DateTimeField('Posting Expire', null=True,
blank=True)

    def __str__(self):
        return "%s" % (self.id)

    def save(self):
        if self.expire == None:
            import datetime
            now = datetime.datetime.today()
            onemonth = datetime.timedelta(days=30)
            self.expire = now + onemonth
        super(Post, self).save()
----------------------------------------------------------------------------------------


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to