Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoSlugField changes slugs that end in numbers consufing them with autoincrementing "next" value #34

Closed
jjdelc opened this issue Jul 5, 2010 · 9 comments

Comments

@jjdelc
Copy link

jjdelc commented Jul 5, 2010

I have an entry titled "Articles 2010", and generate the "articles-2010" slug for it. When I update the entry, AusoSlugField will think that the "2010" part of the slug was the incremental "next" value, and when it finds that there were no 2009 entries with slug "article" before it, it will update the slug to "article", thus breaking a slug that shouldn't have changed.

@jjdelc
Copy link
Author

jjdelc commented Jul 5, 2010

Here's a patch that I'm using.
http://gist.github.com/464710

@gtaylor
Copy link

gtaylor commented Oct 24, 2011

This is also burning us, would much like to see it addressed.

The patch is no longer valid due to upstream changes, but this is still an issue on Aug 24, 2011.

@sdornan
Copy link

sdornan commented Feb 24, 2012

This bug makes the AutoSlugField unusable for me.

@sdornan
Copy link

sdornan commented Feb 24, 2012

This is what I ended up doing:
sdornan/django-extensions@3e0a018

It's definitely a hack, but seems to work okay for my purposes. You would probably run into trouble if you wanted to modify the uniqueness constraints on the AutoSlug field after the fact.

@martino
Copy link

martino commented Sep 11, 2012

guys this is serious, bug still there at Sep 11, 2012. This should definitely be fixed, AutoSlugField is unusable otherwise...

@trbs
Copy link
Member

trbs commented Sep 11, 2012

I still don't see a pull request with tests, docs and a clear description of the solution.

@martino
Copy link

martino commented Sep 11, 2012

here we go

@nostalgiaz
Copy link

+1

trbs added a commit that referenced this issue Sep 15, 2012
@camilonova
Copy link
Member

@trbs seems this issue can be closed.

@trbs trbs closed this as completed Oct 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants