Django

Code

Ticket #1296 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

[patch] Allow SlugFields longer than 50

Reported by: anonymous Assigned to: adrian
Milestone: Component: Metasystem
Version: magic-removal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

slugfield.patch (4.4 kB) - added by matt on 01/30/06 06:04:59.
Patch to allow SlugFields? with maxlength greater than 50

Change History

01/30/06 06:04:59 changed by matt

  • attachment slugfield.patch added.

Patch to allow SlugFields? with maxlength greater than 50

01/30/06 06:20:55 changed by matt

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

02/17/06 12:15:08 changed by adrian

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

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

03/30/06 09:46:10 changed by Andy Dustman <farcepest@gmail.com>

  • status changed from closed to reopened.
  • version changed from SVN to magic-removal.
  • resolution deleted.

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)

04/23/06 17:20:43 changed by adrian

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

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


Add/Change #1296 ([patch] Allow SlugFields longer than 50)




Change Properties
Action