0

I made a mistake and overwrote the Django server's settings file with the local version and I lost the database settings for postgresql I have setup a new user and when I tried to reload the site again I get an error from one of the models as permission denied for relation gallery_image

if I try this command from the shell

from gallery.models import Image

I get back

ProgrammingError: permission denied for relation gallery_image
Samuel M.
  • 91
  • 1
  • 3
  • 12

1 Answers1

0

You need to grant permissions to the new user(In the postgre shell)
This looks close enough.

yoav_aaa
  • 367
  • 2
  • 11
  • I've already tried postgres=# GRANT ALL PRIVILEGES ON DATABASE color_db to revamp; GRANT – Samuel M. Jul 19 '17 at 13:08
  • Take a look at the first answer in the link ive posted. you need to grant on specific tables - GRANT ALL PRIVILEGES ON TABLE Image TO revamp; – yoav_aaa Jul 20 '17 at 10:22