Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1296 closed defect (fixed)

[patch] Allow SlugFields longer than 50

Reported by: anonymous Owned by: adrian
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: UI/UX:

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 9 years ago.
Patch to allow SlugFields with maxlength greater than 50

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by matt

Patch to allow SlugFields with maxlength greater than 50

comment:1 Changed 9 years ago by matt

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

comment:2 Changed 9 years ago by adrian

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

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

comment:3 Changed 9 years ago by Andy Dustman <farcepest@…>

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version changed from SVN to magic-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 Changed 9 years ago by adrian

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

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

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