Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#10718 closed (invalid)

Something's wrong with your database installation, make sure the database is readable by the appropriate user.

Reported by: Praveen Owned by: nobody
Component: contrib.auth Version: 1.0
Severity: Keywords: Something's wrong with your database installation. Make sure the appropriate database tables have been created, and make sure the database is readable by the appropriate user.
Cc: praveen.python.plone@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

def queryset(self, request):
        	qs = super(EventAdmin, self).queryset(request)
        	if not request.user.is_superuser:
            		qs = qs.filter(city=request.user.get_profile().res_city)
        	return qs

it works fine as but it list out all the city's events

def queryset(self, request):
        	qs = super(EventAdmin, self).queryset(request)
        	if request.user.is_superuser:
            		qs = qs.filter(city=request.user.get_profile().res_city)
        	return qs


but when i change the if condition it gives error message

Database error

Something's wrong with your database installation. Make sure the appropriate database tables have been created, and make sure the database is readable by the appropriate user.

Change History (2)

comment:1 by Karen Tracey, 15 years ago

Resolution: invalid
Status: newclosed

The error message likely means exactly what it says: there's something wrong with your database installation. Either you haven't created the tables needed to run request.user.get_profile() or the user specified in settings.py doesn't have permission to read it/them. You don't indicate you have done anything to fix or verify that that is not in fact the problem, so I doubt there is any bug in Django here. If you need help figuring out how to fix the problem with your database, post to django-users. The ticket tracker is for reporting issues with Django itself, not usage help.

comment:2 by Jacob, 13 years ago

milestone: 1.0.3

Milestone 1.0.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top