Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#1280 closed defect (fixed)

[magic-removal] Update django.contrib.contenttypes for magic-removal

Reported by: Esaj Owned by: adrian
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

django.contrib.contenttypes currently uses the old, magic way of getting model objects.

I propose:

  • Get rid of the 'Package' model - is there any use for it now that the magic has gone?
  • Replace ContentType's 'package' and 'python_module_name' fields with a 'model' field.

Attachments (2)

models.py.diff (2.3 KB) - added by Esaj 10 years ago.
contenttypes.diff (10.4 KB) - added by Esaj 10 years ago.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by Esaj

Changed 10 years ago by Esaj

comment:1 Changed 10 years ago by Esaj

The latest patch (contenttypes.diff) updates django.contrib.auth and django.core.management to support the changes as well. I've tested this and it seems to work fine.

comment:2 Changed 10 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [2411]) magic-removal: Fixed #1280 -- Removed contenttypes.Package model and changed ContentType field to have a 'model' field

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