Django

Code

Ticket #8449 (closed: duplicate)

Opened 4 months ago

Last modified 3 months ago

SlugField validator not working in new admin

Reported by: lingrlongr Assigned to: nobody
Milestone: 1.0 Component: django.contrib.admin
Version: SVN Keywords: slug
Cc: Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

Change History

08/22/08 20:10:22 changed by jacob

  • needs_better_patch changed.
  • needs_docs changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • milestone changed from 1.0 maybe to 1.0.

08/23/08 00:02:24 changed by brosner

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

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


Add/Change #8449 (SlugField validator not working in new admin)




Change Properties
Action