Django

Code

Ticket #2098 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

[patch] syncdb fails if models contain ordering fields in format "table.field"

Reported by: Alex Dedul Assigned to: adrian
Milestone: Component: django-admin.py
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

For example with ordering = ('auth_user.username', ) when syncdb is run you get the following error

Error: None couldn't be installed, because there were errors in your model:
intranet.userprofile: "ordering" refers to "auth_user.username", a field that doesn't exist.

Patch below fixes this by skipping ordering fields that contains dot.

Attachments

syncdb_ordering_fields.patch (0.5 kB) - added by Alex Dedul on 06/06/06 08:17:17.

Change History

06/06/06 08:17:17 changed by Alex Dedul

  • attachment syncdb_ordering_fields.patch added.

06/06/06 21:47:53 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

(In [3095]) Fixed #2098 -- Loosened validation for model 'ordering' parameter by allowing periods. Thanks, Alex Dedul


Add/Change #2098 ([patch] syncdb fails if models contain ordering fields in format "table.field")




Change Properties
Action