#35725: Flatpage's get_absolute_url Throws a Regex Tantrum
-------------------------------------+-------------------------------------
     Reporter:  JasonLovesDoggo      |                     Type:  Bug
       Status:  new                  |                Component:
                                     |  contrib.flatpages
      Version:  5.1                  |                 Severity:  Normal
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
 FlatPages' `get_absolute_url` is encountering a regex error, affecting
 both the "view on site" feature and the
 `django.contrib.flatpages.sitemaps.FlatPageSitemap`. The following error
 is observed:

 `Exception Value: redefinition of group name 'url' as group 2; was group 1
 at position 17`

 This issue stems from the following line (L46) in
 `django\contrib\flatpages\models.py`:

   {{{#!python
 return reverse(flatpage, kwargs={"url": url})
   }}}

 Replacing this line with the following seemingly resolves the issue:

   {{{#!python
 return reverse(flatpage, args=(url,))
   }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35725>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070191b0edaf57-c9607ccf-ed02-41a8-8aa4-f375cb5c89bb-000000%40eu-central-1.amazonses.com.

Reply via email to