Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 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.

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by jacob

  • milestone changed from 1.0 maybe to 1.0
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 6 years ago by brosner

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

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

comment:3 Changed 3 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.