#35703: Default URLconf detection does not take a prefix into account
----------------------------------+------------------------------------
     Reporter:  Maarten Breddels  |                    Owner:  (none)
         Type:  Bug               |                   Status:  new
    Component:  Error reporting   |                  Version:  5.1
     Severity:  Normal            |               Resolution:
     Keywords:                    |             Triage Stage:  Accepted
    Has patch:  1                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  1
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+------------------------------------
Changes (by Sarah Boyce):

 * component:  Uncategorized => Error reporting
 * has_patch:  0 => 1
 * needs_better_patch:  0 => 1
 * stage:  Unreviewed => Accepted
 * summary:  default URLconf detection does not take a prefix into account
     => Default URLconf detection does not take a prefix into account

Comment:

 Hi Maarten, thank you for the report!

 I have written a test which you should be able to use
 {{{#!diff
 --- a/tests/view_tests/tests/test_debug.py
 +++ b/tests/view_tests/tests/test_debug.py
 @@ -398,6 +398,13 @@ class DebugViewTests(SimpleTestCase):
              response, "<h1>The install worked successfully!
 Congratulations!</h1>"
          )

 +    @override_settings(ROOT_URLCONF="view_tests.default_urls",
 FORCE_SCRIPT_NAME="/FORCED_PREFIX")
 +    def test_default_urlconf_script_name(self):
 +        response = self.client.request(**{"path": "/FORCED_PREFIX/"})
 +        self.assertContains(
 +            response, "<h1>The install worked successfully!
 Congratulations!</h1>"
 +        )
 +
      @override_settings(ROOT_URLCONF="view_tests.regression_21530_urls")
 }}}
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35703#comment:1>
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/010701917ec374dd-711dcc21-93c6-4eef-8855-ad1586b9d0ff-000000%40eu-central-1.amazonses.com.

Reply via email to