> On Wed, Feb 2, 2011 at 12:59 PM, Jorge Kleinerman (WindBack)
> <jkleinerman@gmail.com> wrote:
>> Thanks
>>
>> I will try to post it there
>
> I'd suggest to do some homework first:
>
> Create a clon of your application and start removing models and fields
> from models. Same thing for the admin.py code (ModelAdmin, etc.)
>
> The rule would be: Remove all you can while the issue you intend to suport
> still shows itself.
>
> Otherwise it will be very hard for somebody to reproduce your scenario.
Also, you have a PhoneUser that has no field (nor reverse related name of
any FK pointing to it) name 'extension':
class PhoneUser(models.Model):
name = models.CharField(verbose_name='Apellido y nombre', max_length=40)
passwd = models.CharField(verbose_name='Clave de usuario',
max_length=4, default='1234')
unit = models.ForeignKey('Unit', verbose_name='Dependencia')
callCategory = models.ManyToManyField('CallCategory',
verbose_name='Tipos de llamadas permitidas')
active = models.BooleanField(verbose_name='Activo')
def __unicode__(self):
return self.name
class Meta:
db_table = 'PhoneUser'
But in the extOwner() method of your CallRecord model you have:
def extOwner(self):
return PhoneUser.objects.filter(extension=self.extension)[0].name
extOwner.short_description = 'Responsable'
That filter() call won't work. Note that line appears at some point of
the traceback report.
Could this be the problem?
Good luck.
--
Ramiro Morales
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment