views:

223

answers:

6

Just installed django-db-log module and trying to make it work properly. 'python manage.py syncdb' command created databases, it seems like logging works, but there is nothing about it in admin panel. As I found in documentation, it should add itself in admin panel without any additional configuration, but then I added 'djangodblog.middleware.DBLogMiddleware' in MIDDLEWARE_CLASSES and 'djangodblog' in INSTALLED_APPS it looks like nothing happens. What I'm doing wrong?

A: 

Yes it should add itself to admin section. And its added for me. So if you are not getting it, only thing that comes to my mind is, you are using older version of django.

simplyharsh
No, I'm using django trunk, 1.2 alpha. Strange.
Enchantner
A: 

It didn't work on my machine either (Mac OS X 10.6). It logged errors to the DB, but did not appear in admin.

I fixed it the following way:

Removed the django_db_log...egg file from Python's site-packages (to uninstall it), unzipped the egg file to a temp directory and moved the created djangodblog directory into my Django project dir.

This did the trick, but you lose the easy_install features this way (of course).

Markus T.
+1  A: 

Hello Markus T.

thank your for your workaround, I had the same problem that my admin interface didn't show djangodblog tables.

Although I have installed the recent django_db_log-1.5.0-py2.6.egg with Django 1.1.1 version.

I moved the created djangodblog directory into my Django project dir, then my admin interface shows the djangodblog tables.

Thank you and best regards.

A: 

That worked for me as well! Thanks!

Jesus Benito
A: 

bit of a work around but adding the following to one of an admin.py file works for me.

from djangodblog.models import Error, ErrorBatch
from djangodblog.admin import ErrorBatchAdmin, ErrorAdmin

admin.site.unregister(Error)
admin.site.unregister(ErrorBatch)
admin.site.register(Error, ErrorAdmin)
admin.site.register(ErrorBatch, ErrorBatchAdmin) 
Jameso
A: 

The last one works fine with django 1.1

sce9sc