Opened 6 years ago

Closed 6 years ago

Last modified 3 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_django 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: UI/UX:

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 Changed 6 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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 Changed 3 years ago by jacob

  • milestone 1.0.3 deleted

Milestone 1.0.3 deleted

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