max slug attempts exceeded AutoSlugField
See original GitHub issueThis poped in release 1.5.6
File "/Users/arun/pyenvs/zubha1.8/lib/python2.7/site- packages/django_extensions/db/fields/__init__.py", line 145, in slug_generator
(original_slug, MAX_UNIQUE_QUERY_ATTEMPTS))
RuntimeError: max slug attempts for test-org exceeded (100)
Slug generation is failing.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:4
- Comments:14 (5 by maintainers)
Top Results From Across the Web
db/fields/__init__.py · hemamaps/django-extensions - Gemfury
_slug_strip(slug) slug = '%s%s' % (slug, end) yield slug raise RuntimeError('max slug attempts for %s exceeded (%s)' % (original_slug, ...
Read more >Django: Increasing the size of Slug with Unique True
According to the documentation the maximum length for a SlugField is 255 characters. But it is the database backend that enforces it so, ......
Read more >Field Extensions — django-extensions 3.2.1 documentation
AutoSlugField - AutoSlugField will automatically create a unique slug incrementing an appended number on the slug until it is unique.
Read more >https://raw.githubusercontent.com/django-extension...
CharField(max_length=42) slug = AutoSlugField(populate_from='title') ... end) yield slug raise RuntimeError('max slug attempts for %s exceeded (%s)' ...
Read more >django-oscar Documentation - Read the Docs
Returns maximum product quantity, that can be added to the basket with the respect to ... This makes no attempt at generating a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Commit: https://github.com/django-extensions/django-extensions/commit/30730f7212fb40eb7d9d64245a13fdcf22ada74e
The setting name is
settings.EXTENSIONS_MAX_UNIQUE_QUERY_ATTEMPTS
. Please try with that.You probably have more then 100 conflicts for the
test-org
slug. (akatest-org-100
also exists)Happy to except PR requests to add additional modes like a random 8 char postfix instead of just sequential numbers.
In the git version you can now configure
MAX_UNIQUE_QUERY_ATTEMPTS
(default = 100) either by passing kwargs to the field or settingsEXTENSION_MAX_UNIQUE_QUERY_ATTEMPTS
insettings.py
.(btw if somebody wants to write a PR for unifying the way we deal with configuration options in settings.py cause that’s kind of a mess right now 😃 )