On 26/07/2010 5:11am, john wrote:
I got the message 'No fixtures found' when I ran the python manage.py
syncdb command.  I am working in sqlite3 which seems to be working as
evidenced by the fact that if I type sqlite in a terminal I get the
sqlite>.

The first time I got the following output, followed by the
aforementioned message.  Subsequent syncdb's just return the
message.

This is normal behaviour. syncdb does nothing if the table already exists - in other words it works only once to create a new table deliberately in case you have inserted data. You wouldn't want it to repeat a create and wipe out your data.

If it doesn't discover any new tables to create it reports 'No fixtures found'

If you want to adjust a table this means you need to dump all data in the table to a receptacle somewhere, change the defining class in models.py then drop the table and run syncdb again. Finally you need a script to adjust your dumped data and pump it back into the new table. This is a very common process and Google will help when you need to do it.

HTH

Mike



Creating table django_admin_log
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
...
Installing index for admin.LogEntry model
Installing index for auth.Permission model
Installing index for auth.Group_permissions model
Installing index for auth.User_user_permissions model
Installing index for auth.User_groups model
Installing index for auth.Message model
No fixtures found.

The Traceback is:
Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/admin
Django Version: 1.2.1
Python Version: 2.6.4
Installed Applications:
['django.contrib.admin',
  'django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'mysite.books']
Installed Middleware:
('django.contrib.auth.middleware.AuthenticationMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  'django.middleware.common.CommonMiddleware')


Traceback:
File "/home/john/Django/lib/python2.6/site-packages/Django-1.2.1-
py2.6.egg/django/core/handlers/base.py" in get_response
   80.                     response = middleware_method(request)
File "/home/john/Django/lib/python2.6/site-packages/Django-1.2.1-
py2.6.egg/django/contrib/auth/middleware.py" in process_request
   15.         assert hasattr(request, 'session'), "The Django
authentication middleware requires session middleware to be installed.
Edit your MIDDLEWARE_CLASSES setting to insert
'django.contrib.sessions.middleware.SessionMiddleware'."

Exception Type: AssertionError at /admin
Exception Value: The Django authentication middleware requires session
middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to
insert 'django.contrib.sessions.middleware.SessionMiddleware'.

My MIDDLEWARE_CLASSES is as follows.

  MIDDLEWARE_CLASSES = (
...     'django.contrib.auth.middleware.AuthenticationMiddleware',
...     'django.contrib.sessins.middleware.SessionsMiddleware',
...     'django.middleware.common.CommonMiddleware',
... )


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to