Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#8449 closed (duplicate)

SlugField validator not working in new admin

Reported by: lingrlongr Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords: slug
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The new admin app is allowing invalid characters in SlugFields. I tested with this model:

# models.py
from django.db import models

class SlugModel(models.Model):
    slug = models.SlugField()
# admin.py    
from django.contrib import admin
from models import SlugModel

class SlugModelAdmin(admin.ModelAdmin):
    pass

admin.site.register(SlugModel, SlugModelAdmin)

In the admin, I tested the following:

  1. hello world
  2. slug%fest
  3. pirate&bay


Each one is saved successfully. A validation error does not appear.

Tested in SVN 8441.

Change History (3)

comment:1 Changed 8 years ago by Jacob

milestone: 1.0 maybe1.0
Triage Stage: UnreviewedAccepted

comment:2 Changed 8 years ago by Brian Rosner

Resolution: duplicate
Status: newclosed

This should have been fixed in [8477] and reported in #8040. Marking a duplicate.

comment:3 Changed 5 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

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