Opened 18 years ago

Closed 17 years ago

#1564 closed defect (invalid)

Filename not accessible post save

Reported by: oyvind@… Owned by: Adrian Holovaty
Component: Core (Other) Version: magic-removal
Severity: major Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description


def save(self):
    
        super(Image, self).save()
        assert False, self.get_image_filename() # ( get_FOO_filename() ) gives no filename
        
        pass

Attachments (1)

manipulators.diff (898 bytes ) - added by oyvind@… 18 years ago.
Diff to save file before saving in manipulator

Download all attachments as: .zip

Change History (7)

comment:1 by oyvind@…, 18 years ago

Only get the upload to path, but no filename.

comment:2 by oyvind@…, 18 years ago

Oops, not upload to path, but just MEDIA_ROOT path.

comment:3 by oyvind@…, 18 years ago

This does not give a filename:

def save(self):
        super(Image, self).save()
        
        i = Image.objects.get(id__exact=self.id)
        
        assert False, i.get_image_filename()

        pass

Either does this:

    def save(self):
    
        super(Image, self).save()
        
        tbl = getattr(self._meta,'db_table')
        
        cursor = connection.cursor()
        cursor.execute("SELECT * FROM %s where id=%i" % (tbl, self.id) )
        row = cursor.fetchone()
        assert False, row
        
        pass

by oyvind@…, 18 years ago

Attachment: manipulators.diff added

Diff to save file before saving in manipulator

comment:4 by Stefano J. Attardi <django@…>, 18 years ago

Related to #639?

comment:5 by anonymous, 17 years ago

This is because you have not entered the sectory code

comment:6 by Simon G. <dev@…>, 17 years ago

Resolution: invalid
Status: newclosed

marked as invalid due to the lack of information and the age of the ticket. If this is still a problem, please reopen it.

Note: See TracTickets for help on using tickets.
Back to Top