Opened 5 years ago
Closed 5 years ago
#32598 closed Bug (invalid)
Issue in models.SlugField
| Reported by: | MojixCoder | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (URLs) | Version: | 3.1 |
| Severity: | Normal | Keywords: | slug |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
After setting allow_unicode=True for a SlugField in Our models we cant still use persian slugs because in <slug:slug> it doesn't accept unicode slugs ( take a look at slug regex ).
path('<slug:slug>/', CategoryArticlesView.as_view(), name="category"),
Reverse for 'category' with arguments '('برنامه-نویسی',)' not found. 1 pattern(s) tried: articles/(
remember than allow_unicode=True is working fine in SlugField but url <slug:slug> doesn't accept it
Note:
See TracTickets
for help on using tickets.
SlugField.allow_unicodedoesn't impact path converters. It is also documented that:You can create a custom path converter or use
re_path().