Code

Opened 8 years ago

Closed 7 years ago

#1564 closed defect (invalid)

Filename not accessible post save

Reported by: oyvind@… Owned by: adrian
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: UI/UX:

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@… 8 years ago.
Diff to save file before saving in manipulator

Download all attachments as: .zip

Change History (7)

comment:1 Changed 8 years ago by oyvind@…

Only get the upload to path, but no filename.

comment:2 Changed 8 years ago by oyvind@…

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

comment:3 Changed 8 years ago by oyvind@…

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

Changed 8 years ago by oyvind@…

Diff to save file before saving in manipulator

comment:4 Changed 8 years ago by Stefano J. Attardi <django@…>

Related to #639?

comment:5 Changed 8 years ago by anonymous

This is because you have not entered the sectory code

comment:6 Changed 7 years ago by Simon G. <dev@…>

  • Resolution set to invalid
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.