Hi everyone,
I've got a problem and I don't even know where to start debugging
it... there seems to be a difference between the way my app is
behaving between my local environment and my deployment environment.
Hopefully you guys can give me some idea where to start.
I've written a small PR application that along with a story, publishes
pictures and other files. I've written models that look like this
(this is all written on the trunk):
class Story(models.Model):
title = models.CharField(max_length=100)
date = models.DateField()
slug = models.SlugField()
published = models.BooleanField()
body = models.TextField()
class Meta:
verbose_name_plural = "stories"
ordering = ['-date']
pass
def __str__(self):
return self.title.encode("utf-8")
class Admin:
list_display = ('title','date','slug',)
pass
class Picture(models.Model):
image = models.ImageField(upload_to="photos")
date = models.DateField()
title = models.CharField(max_length=100, core=True)
caption = models.CharField(max_length=100, blank=True)
story = models.ForeignKey(Story, edit_inline=models.STACKED)
def __str__(self):
return self.title.encode("utf-8")
class Meta:
ordering = ['-date']
pass
class Downloads(models.Model):
media = models.FileField(upload_to="downloads")
date = models.DateField()
title = models.CharField(max_length=100, core=True)
story = models.ForeignKey(Story, edit_inline=models.STACKED)
def __str__(self):
return self.title.encode("utf-8")
class Meta:
verbose_name_plural = "downloads"
ordering = ['-date']
pass
This works great locally on my machine. However, when I deploy on
WebFaction (again using a django instance built from the trunk),
everything appears to be fine until I edit a Story object in the Admin
UI. When I try and save any edits (no matter what field I edit), I
get this error:
Traceback:
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/core/
handlers/base.py" in get_response
82. response = callback(request, *callback_args,
**callback_kwargs)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/contrib/
admin/views/decorators.py" in _checklogin
62. return view_func(request, *args, **kwargs)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/views/
decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, **kwargs)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/contrib/
admin/views/main.py" in change_stage
338. new_object = manipulator.save(new_data)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/db/
models/manipulators.py" in save
207. f.save_file(rel_new_data,
new_rel_obj, self.change and old_rel_obj or None, old_rel_obj is not
None, rel=True)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/db/
models/fields/__init__.py" in save_file
933. FileField.save_file(self, new_data, new_object,
original_object, change, rel, save)
File "/home/myaccount/webapps/mysite_site/lib/python2.5/django/db/
models/fields/__init__.py" in save_file
847. file_name = file['filename']
Exception Type: TypeError at /admin/pr/story/1/
Exception Value: string indices must be integers
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---