Re: [Django] #29068: Django urlpatterns has limit of allowed urls with namespace?

2018-02-03 Thread Django
#29068: Django urlpatterns has limit of allowed urls with namespace?
---+--
 Reporter:  Gerben Morsink |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Core (URLs)|  Version:  1.11
 Severity:  Normal |   Resolution:  needsinfo
 Keywords:  urlpatterns limit  | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by Gerben Morsink):

 I have found the issue.

 I had an url of type:

 url(r'^aboutus/$', RedirectView.as_view(url=reverse('aboutus'),
 permanent=True)) in my urls.py. Where the 'aboutus' url was defined
 somewhere above in an included sub urls.py.

 With the Django testserver this works fine, but in production (Apache +
 WSGI) it gives a lot of seemingly strange errors, such as unexpected 404s
 and (after including the package silk) unexpected 500 errors. The strange
 thing was, that it did work on the test server (also Apache + WSGI), but
 not on the live server. It gave me some pulled out grey hair, so I hope
 someone finds this anwers when the need is there.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29068#comment:2>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.627c5adb0e07d0bd884dbbfab7e22e9e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29068: Django urlpatterns has limit of allowed urls with namespace?

2018-01-26 Thread Django
#29068: Django urlpatterns has limit of allowed urls with namespace?
---+--
 Reporter:  Gerben Morsink |Owner:  nobody
 Type:  Bug|   Status:  closed
Component:  Core (URLs)|  Version:  1.11
 Severity:  Normal |   Resolution:  needsinfo
 Keywords:  urlpatterns limit  | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by Tim Graham):

 * status:  new => closed
 * resolution:   => needsinfo


Comment:

 You should debug your code and confirm that Django is at fault before
 creating a ticket. We can't triage the issue without a sample project to
 reproduce it. Please reopen the ticket if you can do one of those things.
 Thanks.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29068#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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.3a8d8406ff907c68cdce05f395d78851%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #29068: Django urlpatterns has limit of allowed urls with namespace?

2018-01-26 Thread Django
#29068: Django urlpatterns has limit of allowed urls with namespace?
-+-
   Reporter:  Gerben |  Owner:  nobody
  Morsink|
   Type:  Bug| Status:  new
  Component:  Core   |Version:  1.11
  (URLs) |
   Severity:  Normal |   Keywords:  urlpatterns limit
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 I'm currently working on a huge site with a huge number of distinct
 urlpatterns, that are categorized in a tree pattern, starting with the
 project's urls.py and then going down the tree with include statements
 (sometimes namespaced), which in turn have their own include statements,
 untill we are about 4 branches away.

 Next to that many urlpatterns are conditional (if settings.DEBUG ... if
 'app_x' in installed_apps... etc).

 I have had issues with one of the last urlpatterns in the project's
 urls.py a lot on my production environment, on apache + wsgi ('No reverse
 found'), which I couldn't reproduce on my development machine with
 runserver . It has a namespace set. It was not a user facing endpoint so I
 forgot about it.

 Now I have added another urlpattern to the project's urls.py with a
 namespace and it too gives 'No reverse found' (it is reversed in a
 middleware, so the app does not start at all, making it easier to test).

 When I place the last urlpattern up in the projects urls.py that it comes
 as the second urlpattern, the app does start, so it looks like the
 urlpatterns are going into some kind of limit.

 For your reference this is the code that works when placed after the first
 urlpatterns definition, but not when placed at the bottom (I think nothing
 special).

 {{{
 if 'silk' in settings.INSTALLED_APPS:
 urlpatterns += [url(r'^silk/', include('silk.urls',
 namespace='silk'))]
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29068>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.eff0b65ddbe5c1d4b804f399c7e7ff44%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.