[pyar] FieldDoesNotExist('%s has no field named %r' % (self.object_name, name))

Jonathan G Linenberg jlinenberg en gmail.com
Sab Abr 7 16:58:09 ART 2012


El 7 de abril de 2012 16:27, Felipe Lerena <felipelerena en gmail.com>escribió:

> Que error te da ahora?
>
Exactamente el mismo:

Traceback (most recent call last):
  File
"C:\Users\Linenberg\Dropbox\WorkSpace\RescueCommittee\RescueCommittee\manage.py",
line 14, in <module>
    execute_manager(settings)
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py",
line 438, in execute_manager
    utility.execute()
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py",
line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Python27\lib\site-packages\django\core\management\base.py", line
191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "C:\Python27\lib\site-packages\django\core\management\base.py", line
219, in execute
    self.validate()
  File "C:\Python27\lib\site-packages\django\core\management\base.py", line
249, in validate
    num_errors = get_validation_errors(s, app)
  File
"C:\Python27\lib\site-packages\django\core\management\validation.py", line
122, in get_validation_errors
    if not f.rel.to._meta.get_field(f.rel.field_name).unique:
  File "C:\Python27\lib\site-packages\django\db\models\options.py", line
289, in get_field
    raise FieldDoesNotExist('%s has no field named %r' % (self.object_name,
name))
django.db.models.fields.FieldDoesNotExist: Province has no field named
<django.utils.functional.__proxy__ object at 0x0000000003712828>
Finished
"C:\Users\Linenberg\Dropbox\WorkSpace\RescueCommittee\RescueCommittee\manage.py
syncdb" execution.

y los modelos estan definidos asi:

from django.db import models
from django.utils.translation import ugettext_lazy as _

#===============================================================================
# Province model
#===============================================================================
class Province(models.Model):
    name = models.CharField(verbose_name=_('name'), max_length=30)

    class Meta:
        verbose_name = _('province')
        verbose_name_plural = _('provinces')

    def __unicode__(self):
        return u'%s' % (self.name)
#------------------------------------------------------------------------------
--
*Jonathan G. Linenberg*
Linux User # 521828

>  On Apr 7, 2012 4:10 PM, "Jonathan G Linenberg" <jlinenberg en gmail.com>
> wrote:
>
>> El 7 de abril de 2012 15:48, Felipe Lerena <felipelerena en gmail.com>escribió:
>>
>>> Seguramente tengas que dropear la base y sinquear de nuevo
>>>
>>
>> La base corre sobre SQLite y antes de hacer el sync borre el archivo de
>> la base para que cree la base desde 0 :S
>>
>> Es muy raro esto
>>
>> --
>> *Jonathan G. Linenberg*
>> Linux User # 521828
>>
>> _______________________________________________
>> pyar mailing list pyar en python.org.ar
>> http://listas.python.org.ar/listinfo/pyar
>>
>> PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
>>
>> La lista de PyAr esta Hosteada en USLA - Usuarios de Software Libre de
>> Argentina - http://www.usla.org.ar
>>
>
> _______________________________________________
> pyar mailing list pyar en python.org.ar
> http://listas.python.org.ar/listinfo/pyar
>
> PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
>
> La lista de PyAr esta Hosteada en USLA - Usuarios de Software Libre de
> Argentina - http://www.usla.org.ar
>
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20120407/f11d744e/attachment.html>


More information about the pyar mailing list