Opened 6 years ago

Closed 6 years ago

#14734 closed (invalid)

problem with postgresql views (psycopg2)

Reported by: fulviociriaco Owned by: nobody
Component: Database layer (models, ORM) Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by Alex Gaynor)

I attempted to use django with postgresql views by means of model class, the view rows
however do not change when the db is externally updated untill reentering python, e.g.

>>> mv=MyView.object
>>> mv.all()
[<Myview: MyView object>]
insert row into table
>>> mv.all()
[<Myview: MyView object>]     #1 row
^d shell
>>> from ... import MyView
>>> MyView.objects.all()
[<Myview: MyView object>,<Myview: MyView object>]  #2 rows

That's all.

Change History (2)

comment:1 Changed 6 years ago by Alex Gaynor

Description: modified (diff)
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

I've reformatted the description of this ticket, in the future you can use the "Preview" button to ensure that your message is formatted the way you intended.

comment:2 Changed 6 years ago by Russell Keith-Magee

Resolution: invalid
Status: newclosed

This sounds like a case of user-error, related to the default isolation mode of your server. Unless you can point at something specific that Django is doing wrong, I'm going to close this.

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