Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1296 closed defect (fixed)

[patch] Allow SlugFields longer than 50

Reported by: anonymous Owned by: Adrian Holovaty
Component: Metasystem Version: magic-removal
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I ran in to the hard 50 character SlugField limit while importing my wordpress blog entries to Django. While slugs longer than 50 are probably not desirable, there may be some cases (such as this) where they are required. I've patched trunk as of [2185] to default to a maxlength of 50 but allow that value to be overridden.

It works perfectly for me on Postgres, but it should behave just fine on the other backends too.

I haven't checked out magic-removal yet but can apply these changes there too if that will help.

Attachments (1)

slugfield.patch (4.4 KB ) - added by matt 18 years ago.
Patch to allow SlugFields with maxlength greater than 50

Download all attachments as: .zip

Change History (5)

by matt, 18 years ago

Attachment: slugfield.patch added

Patch to allow SlugFields with maxlength greater than 50

comment:1 by matt, 18 years ago

I just noticed that I filled out this ticket as "anonymous". Oops!

comment:2 by Adrian Holovaty, 18 years ago

Resolution: fixed
Status: newclosed

(In [2325]) Fixed #1296 -- Made SlugField maxlength configurable. Thanks, Matt

comment:3 by Andy Dustman <farcepest@…>, 18 years ago

Resolution: fixed
Status: closedreopened
Version: SVNmagic-removal

The changes to fields.py were never merged into magic-removal; it still has a mandatory maxlength=50. Trivial one-line fix:

        kwargs['maxlength'] = kwargs.get('maxlength', 50)

comment:4 by Adrian Holovaty, 18 years ago

Resolution: fixed
Status: reopenedclosed

(In [2737]) magic-removal: Fixed #1296 (allow SlugFields longer than 50)

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