#33341: The PrimaryKey of an Unmanaged Model is incorrectly regognized 
(accessing
database VIEW)
-------------------------------------+-------------------------------------
     Reporter:  Janne                |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Uncategorized        |                  Version:  3.2
     Severity:  Normal               |               Resolution:  needsinfo
     Keywords:  Unmanaged model,     |             Triage Stage:
  Database VIEW, postgres            |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Carlton Gibson):

 * status:  new => closed
 * resolution:   => needsinfo


Comment:

 Hi. I don't think there's quite enough detail here to see what you're
 issue is.

 In general, using `managed=False` works with views, and has for many
 years, see e.g. #16320.

 You mention the primary key, but don't provide the model definition.
 Ensure you're declaring a field as `primary_key=True`.
 There was a recent [https://pganalyze.com/blog/postgresql-views-django-
 python walk through on using views with Django (targeting Postgres)] that
 might help you if you walk through it.

 Otherwise, it looks like a usage issue, so you'll need to use one of the
 support channels. See TicketClosingReasons/UseSupportChannels.

 If you can provide a sample project or a failing test case showing a fault
 in Django, then very happy to re-open and have a look.
 Thanks.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33341#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.81715fb0496363cc9afb5446dd11a551%40djangoproject.com.

Reply via email to