#3708: possible incompatibility with edit inline and python 2.5
--------------------------------------+-------------------------------------
Reporter:  [EMAIL PROTECTED]  |       Owner:  jacob                  
  Status:  new                        |   Component:  Uncategorized          
 Version:  SVN                        |    Keywords:  filepathfield python2.5
   Stage:  Unreviewed                 |   Has_patch:  0                      
--------------------------------------+-------------------------------------
 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'.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3708>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to