django error about syncdb

14 views
Skip to first unread message

tony yu

unread,
May 30, 2008, 4:55:12 AM5/30/08
to Django users
when I use syncdb, get the error:

[root@django /data/mysite]# python manage.py syncdb
Error: One or more models did not validate:
auth.group: "admin.list_display" refers to '__ipow__', which isn't an
attribute, method or property.

pls help me, thanks!

Karen Tracey

unread,
May 30, 2008, 9:22:02 AM5/30/08
to django...@googlegroups.com

What version of Django?

What is the value for INSTALLED_APPS in your settings.py?

If your INSTALLED_APPS includes 'django.contrib.auth', what happens when you remove it and try 'python manage.py syncdb' again?

Karen

tony yu

unread,
May 31, 2008, 2:07:56 AM5/31/08
to Django users
version info:
django svn version, freebsd 7.0, python 2.5.2
settings.py:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'mysite.polls',
)

the os stdout:
[root@django /data/mysite]# python manage.py syncdb
Creating table auth_message
Creating table auth_group
Creating table auth_user
Creating table auth_permission
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table polls_poll
Creating table polls_choice

You just installed Django's auth system, which means you don't have
any superusers defined.
Would you like to create one now? (yes/no): yes
Username (Leave blank to use 'root'): root
E-mail address: fd...@fdsfsd.cc
Password:
Password (again):
Superuser created successfully.
Installing index for auth.Message model
Installing index for auth.Permission model
Installing index for admin.LogEntry model
Installing index for polls.Choice model
Error: One or more models did not validate:
auth.group: "admin.list_display" refers to '__ipow__', which isn't an
attribute, method or property.

Karen, thank you.

On 5月30日, 下午9时22分, "Karen Tracey" <kmtra...@gmail.com> wrote:

Karen Tracey

unread,
May 31, 2008, 5:42:34 PM5/31/08
to django...@googlegroups.com

That's bizarre.  Model validation succeeds once, the tables are added and indices are created, then when syncdb goes to try and load fixtures it runs model validation again and this time it dies. 

I assume you have not changed anything in the django/contrib/auth/models.py file?

Did this happen the very first time you ran syncdb or not until you added something (django.contrib.admin, mysite.polls)?  If you try removing mysite.polls from INSTALLED_APPS does the problem go away?  If it does, then the problem is somewhere in what you've done with mysite/polls, though I have no idea what. 

Karen










 

tony yu

unread,
Jun 1, 2008, 11:30:51 AM6/1/08
to Django users
when i remove django.contrib.admin from INSTALLED_APPS, run syncdb
success.
I think django is not Compatible with python 2.5.2?

On 6月1日, 上午5时42分, "Karen Tracey" <kmtra...@gmail.com> wrote:

Karen Tracey

unread,
Jun 1, 2008, 11:40:16 AM6/1/08
to django...@googlegroups.com
On Sun, Jun 1, 2008 at 11:30 AM, tony yu <tony...@gmail.com> wrote: 
when i remove django.contrib.admin from INSTALLED_APPS, run syncdb
success.
I think django is not Compatible with python 2.5.2?

No, I've got Python 2.5.2 on one of my machines, so it is not as simple as just the Python level.  What I don't have is a Freebsd 7 machine.  Here's someone else having trouble with Django on Freebsd 7/Python 2.5.2:

http://groups.google.com/group/django-users/browse_thread/thread/8607251d009573f2

though they managed to get past syncdb with admin included in INSTALLED_APPS.  Both of your reports are very puzzling and I don't have any good ideas on what might be going on, sorry.

Karen
 
Reply all
Reply to author
Forward
0 new messages