﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3708	possible incompatibility with edit inline and python 2.5.1rc1	mcallister.sean@…	Jacob	"I've noticed a problem with python 2.5 and one of my models. It might be that this is caused by my distributions (Ubuntu Feisty) python packages, as they seem a little flaky to say the least. Using python 2.4 the problem is not there.
I stripped the problem down to this little test model:
{{{
from django.db import models

class Media(models.Model):
    signature = models.CharField(unique=True, maxlength=100)
    note = models.TextField(null=True, blank=True)

    class Admin:
        pass
    def __str__(self):
        return ""%s"" %(self.signature)

class File(models.Model):
    files_path = models.FilePathField(path=""/path/to/files/"", recursive=True, core=True)
    files_medium = models.ForeignKey(""Media"", edit_inline=models.STACKED, num_in_admin=1, max_num_in_admin=1)
    
    def __str__(self):
	return self.files_path
    
    def save(self):
	print ""DEBUG::::preparing to save file with path: %s"" %(self.files_path)
	super(File,self).save()
}}}

The problem is with the files_path, which is stripped down to '/' with python 2.5, as can be seen in the debug line. Python 2.4 gets the whole path '/path/to/files/file.txt'.


"		closed	Uncategorized	dev		invalid	filepathfield python2.5	eric@…	Accepted	0	0	0	0	0	0
