Re: [Django] #18418: Debug doesn't catch exception instead complains views does not exist

2014-02-15 Thread Django
#18418: Debug doesn't catch exception instead complains views does not exist
-+
 Reporter:  yeukhon  |Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Core (URLs)  |  Version:  1.4
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  debug| Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by gnosek):

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


Comment:

 It's already fixed by:

 {{{
 commit 367bfaa5226eaae3278989e63f16063d5cc46cd8
 Author: Florian Apolloner 
 Date:   Tue Aug 14 21:12:08 2012 +0200

 Don't swallow AttributeError in core.urlresolvers.get_callable.
 }}}

 which made its way into 1.5

-- 
Ticket URL: 
Django 
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/065.2bbd745842a9e8cf5520628d5aafd176%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #18418: Debug doesn't catch exception instead complains views does not exist

2014-02-15 Thread Django
#18418: Debug doesn't catch exception instead complains views does not exist
-+
 Reporter:  yeukhon  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (URLs)  |  Version:  1.4
 Severity:  Normal   |   Resolution:
 Keywords:  debug| Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by gnosek):

 How can I reproduce it?

 {{{
 # app18418/forms.py
 from django import forms

 class SubmitButtonField(forms.Field):
 pass

 class AForm(forms.Form):
 save_button = forms.SubmitButtonField(required=False)

 # cat app18418/views.py
 import app18418.forms

 def a_view(request):
 form = app18418.forms.AForm()

 # app18418/urls.py
 from django.conf.urls import patterns, include, url
 from django.contrib import admin

 urlpatterns = patterns('',
 url(r'^$', 'app18418.views.a_view', name='home'),
 )
 }}}

 Visiting / properly raises the exception:

 {{{
 AttributeError at /
 'module' object has no attribute 'SubmitButtonField'
 }}}

-- 
Ticket URL: 
Django 
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/065.e7e5da2c586858fe6ef3e9928cc5de41%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #18418: Debug doesn't catch exception instead complains views does not exist

2012-07-08 Thread Django
#18418: Debug doesn't catch exception instead complains views does not exist
-+
 Reporter:  yeukhon  |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (URLs)  |  Version:  1.4
 Severity:  Normal   |   Resolution:
 Keywords:  debug| Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by aaugustin):

 * component:  Uncategorized => Core (URLs)
 * type:  Uncategorized => Bug
 * stage:  Unreviewed => Accepted


Comment:

 Indeed, this is raising an `AttributeError`, which is caught in
 `django.core.urlresolvers.get_callable()`. A completely different
 exception is then raised.

 Django (generally) shouldn't mask exceptions.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #18418: Debug doesn't catch exception instead complains views does not exist

2012-07-08 Thread Django
#18418: Debug doesn't catch exception instead complains views does not exist
---+--
 Reporter:  yeukhon|Owner:  nobody
 Type:  Uncategorized  |   Status:  new
Component:  Uncategorized  |  Version:  1.4
 Severity:  Normal |   Resolution:
 Keywords:  debug  | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by aaugustin):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> Suppose we have this forms.py: http://codepad.org/HIt9bBtA
>
> Notice that `save_button` has an error. I accidentally added `forms.` in
> the beginning. This is invalid, and Python will raise exception.
>
> However, when we try to visit the page, it complains about
> `myapp.views.view_name` does not exist.
> I fired up django shell, and when I `import myapp.views` I got this
> error:
>
> {{{
> AttributeError: 'module' object has no attribute 'SubmitButtonField'
> }}}
>

> Django debug page does not really catch this kind of exception. Is this a
> bug or an enactment-to-be-made?

New description:

 Suppose we have this forms.py:

 {{{
 class SubmitButtonField(forms.Field):
  # here we write a custom field

 class Editor(forms.Form):
 script_name = forms.CharField(max_length=60, min_length=1)
 view_level = forms.ChoiceField(widget=forms.widgets.RadioSelect,
 choices=VIEW_LEVEL)
 text_box = forms.CharField(widget=forms.widgets.Textarea,
 required=False)
 save_button = forms.SubmitButtonField(required=False)

 # notice save_button above
 }}}

 Notice that `save_button` has an error. I accidentally added `forms.` in
 the beginning. This is invalid, and Python will raise exception.

 However, when we try to visit the page, it complains about
 `myapp.views.view_name` does not exist.
 I fired up django shell, and when I `import myapp.views` I got this error:

 {{{
 AttributeError: 'module' object has no attribute 'SubmitButtonField'
 }}}


 Django debug page does not really catch this kind of exception. Is this a
 bug or an enactment-to-be-made?

--

Comment:

 Replaced the link to a paste site with the actual content, in case the
 past site disappears.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #18418: Debug doesn't catch exception instead complains views does not exist

2012-06-03 Thread Django
#18418: Debug doesn't catch exception instead complains views does not exist
---+
 Reporter:  yeukhon|  Owner:  nobody
 Type:  Uncategorized  | Status:  new
Component:  Uncategorized  |Version:  1.4
 Severity:  Normal |   Keywords:  debug
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  0  |  UI/UX:  0
---+
 Suppose we have this forms.py: http://codepad.org/HIt9bBtA

 Notice that `save_button` has an error. I accidentally added `forms.` in
 the beginning. This is invalid, and Python will raise exception.

 However, when we try to visit the page, it complains about
 `myapp.views.view_name` does not exist.
 I fired up django shell, and when I `import myapp.views` I got this error:

 {{{
 AttributeError: 'module' object has no attribute 'SubmitButtonField'
 }}}


 Django debug page does not really catch this kind of exception. Is this a
 bug or an enactment-to-be-made?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.