[Django] #30432: Django development server shutdown on error

4 views
Skip to first unread message

Django

unread,
May 2, 2019, 9:44:06 AM5/2/19
to django-...@googlegroups.com
#30432: Django development server shutdown on error
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
User632716 |
Type: | Status: new
Uncategorized |
Component: | Version: 2.2
Uncategorized | Keywords: dev-server
Severity: Normal | devserver
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
As in my question on SO
[here](https://stackoverflow.com/questions/55953263/django-development-
server-shutdown-on-error) I am running a dev server on localhost to test a
django app. About a week ago the dev server started exiting on error-
which is not ideal.

To give you an instance, imagine I want to create a new view, I make my
template, then I add the following in urls:

```python
urlpatterns = [
...
path('forgotten-password', ForgottenPassword.as_view(),
name='forgotten_password'),
]
```

I haven't yet created the ForgottenPassword class based view yet, so
rightly the server throws the error:

```python
File "/code/accounts/urls.py", line 19, in <module>
path('forgotten-password', ForgottenPassword.as_view(),
name='forgotten_password'),
NameError: name 'ForgottenPassword' is not defined
```
The server then quits however. This is not the desired behavior. I expect
the server to remain in an error state until i fix the error (this
happened up to about a week ago). It was around the same time that we
upgraded from django 2.1 to 2.2, is this a desired behaviour in 2.2?

--
Ticket URL: <https://code.djangoproject.com/ticket/30432>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 2, 2019, 9:45:23 AM5/2/19
to django-...@googlegroups.com
#30432: Django development server shutdown on error
-------------------------------------+-------------------------------------
Reporter: User632716 | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 2.2
Severity: Normal | Resolution:
Keywords: dev-server | Triage Stage:
devserver | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by User632716:

Old description:

> As in my question on SO
> [here](https://stackoverflow.com/questions/55953263/django-development-
> server-shutdown-on-error) I am running a dev server on localhost to test
> a django app. About a week ago the dev server started exiting on error-
> which is not ideal.
>
> To give you an instance, imagine I want to create a new view, I make my
> template, then I add the following in urls:
>
> ```python
> urlpatterns = [
> ...
> path('forgotten-password', ForgottenPassword.as_view(),
> name='forgotten_password'),
> ]
> ```
>
> I haven't yet created the ForgottenPassword class based view yet, so
> rightly the server throws the error:
>
> ```python
> File "/code/accounts/urls.py", line 19, in <module>
> path('forgotten-password', ForgottenPassword.as_view(),
> name='forgotten_password'),
> NameError: name 'ForgottenPassword' is not defined
> ```
> The server then quits however. This is not the desired behavior. I expect
> the server to remain in an error state until i fix the error (this
> happened up to about a week ago). It was around the same time that we
> upgraded from django 2.1 to 2.2, is this a desired behaviour in 2.2?

New description:

As in my question on SO
[here](https://stackoverflow.com/questions/55953263/django-development-
server-shutdown-on-error) I am running a dev server on localhost to test a
django app. About a week ago the dev server started exiting on error-
which is not ideal.

To give you an instance, imagine I want to create a new view, I make my
template, then I add the following in urls:

urlpatterns = [
...
path('forgotten-password', ForgottenPassword.as_view(),
name='forgotten_password'),
]

I haven't yet created the ForgottenPassword class based view yet, so
rightly the server throws the error:

File "/code/accounts/urls.py", line 19, in <module>


path('forgotten-password', ForgottenPassword.as_view(),
name='forgotten_password'),
NameError: name 'ForgottenPassword' is not defined

The server then quits however. This is not the desired behavior. I expect
the server to remain in an error state until i fix the error (this
happened up to about a week ago). It was around the same time that we
upgraded from django 2.1 to 2.2, is this a desired behaviour in 2.2?

--

--
Ticket URL: <https://code.djangoproject.com/ticket/30432#comment:1>

Django

unread,
May 2, 2019, 9:46:25 AM5/2/19
to django-...@googlegroups.com
#30432: Django development server shutdown on error
-------------------------------------+-------------------------------------
Reporter: User632716 | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 2.2
Severity: Normal | Resolution:
Keywords: dev-server | Triage Stage:
devserver | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by User632716:

Old description:

> As in my question on SO


> [here](https://stackoverflow.com/questions/55953263/django-development-
> server-shutdown-on-error) I am running a dev server on localhost to test
> a django app. About a week ago the dev server started exiting on error-
> which is not ideal.
>
> To give you an instance, imagine I want to create a new view, I make my
> template, then I add the following in urls:
>

> urlpatterns = [


> ...
> path('forgotten-password', ForgottenPassword.as_view(),
> name='forgotten_password'),
> ]
>
> I haven't yet created the ForgottenPassword class based view yet, so
> rightly the server throws the error:
>

> File "/code/accounts/urls.py", line 19, in <module>
> path('forgotten-password', ForgottenPassword.as_view(),
> name='forgotten_password'),
> NameError: name 'ForgottenPassword' is not defined
>
> The server then quits however. This is not the desired behavior. I expect
> the server to remain in an error state until i fix the error (this
> happened up to about a week ago). It was around the same time that we
> upgraded from django 2.1 to 2.2, is this a desired behaviour in 2.2?

New description:

As in my question on SO
[here](https://stackoverflow.com/questions/55953263/django-development-
server-shutdown-on-error) I am running a dev server on localhost to test a
django app. About a week ago the dev server started exiting on error-
which is not ideal.

To give you an instance, imagine I want to create a new view, I make my
template, then I add the following in urls:

urlpatterns = [
...
path('forgotten-password', ForgottenPassword.as_view(),
name='forgotten_password'),
]

I haven't yet created the ForgottenPassword class based view yet, so
rightly the server throws the error:

File "/code/accounts/urls.py", line 19, in <module>


path('forgotten-password', ForgottenPassword.as_view(),
name='forgotten_password'),
NameError: name 'ForgottenPassword' is not defined

The server then quits however. This is not the desired behavior. I expect
the server to remain in an error state until i fix the error (this
happened up to about a week ago). It was around the same time that we
upgraded from django 2.1 to 2.2, is this a desired behaviour in 2.2?

--

--
Ticket URL: <https://code.djangoproject.com/ticket/30432#comment:2>

Django

unread,
May 2, 2019, 9:53:37 AM5/2/19
to django-...@googlegroups.com
#30432: Django development server shutdown on error
-------------------------------------+-------------------------------------
Reporter: User632716 | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 2.2
Severity: Normal | Resolution:
Keywords: dev-server | Triage Stage:
devserver | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by User632716:

Old description:

> As in my question on SO


> [here](https://stackoverflow.com/questions/55953263/django-development-
> server-shutdown-on-error) I am running a dev server on localhost to test
> a django app. About a week ago the dev server started exiting on error-
> which is not ideal.
>
> To give you an instance, imagine I want to create a new view, I make my
> template, then I add the following in urls:
>

> urlpatterns = [


> ...
> path('forgotten-password', ForgottenPassword.as_view(),
> name='forgotten_password'),
> ]
>
> I haven't yet created the ForgottenPassword class based view yet, so
> rightly the server throws the error:
>

> File "/code/accounts/urls.py", line 19, in <module>
> path('forgotten-password', ForgottenPassword.as_view(),
> name='forgotten_password'),
> NameError: name 'ForgottenPassword' is not defined
>
> The server then quits however. This is not the desired behavior. I expect
> the server to remain in an error state until i fix the error (this
> happened up to about a week ago). It was around the same time that we
> upgraded from django 2.1 to 2.2, is this a desired behaviour in 2.2?

New description:

As in my question on SO
[here](https://stackoverflow.com/questions/55953263/django-development-
server-shutdown-on-error) I am running a dev server on localhost to test a
django app. About a week ago the dev server started exiting on error-
which is not ideal.

To give you an instance, imagine I want to create a new view, I make my
template, then I add the following in urls:


urlpatterns = [...,path('forgotten-password',
ForgottenPassword.as_view(), name='forgotten_password'),...]

I haven't yet created the ForgottenPassword class based view yet, so
rightly the server throws the error:

File "/code/accounts/urls.py", line 19, in <module>


path('forgotten-password', ForgottenPassword.as_view(),
name='forgotten_password'),
NameError: name 'ForgottenPassword' is not defined

The server then quits however. This is not the desired behavior. I expect
the server to remain in an error state until i fix the error (this
happened up to about a week ago). It was around the same time that we
upgraded from django 2.1 to 2.2, is this a desired behaviour in 2.2?

* Having downgraded to 2.1 we no longer have this problem, it must be to
do with the update

--

--
Ticket URL: <https://code.djangoproject.com/ticket/30432#comment:3>

Django

unread,
May 2, 2019, 12:02:22 PM5/2/19
to django-...@googlegroups.com
#30432: Django development server shutdown on error.

-------------------------------------+-------------------------------------
Reporter: User632716 | Owner: nobody
Type: Uncategorized | Status: closed
Component: Utilities | Version: 2.2
Severity: Normal | Resolution: duplicate

Keywords: dev-server | Triage Stage:
devserver | Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: new => closed
* resolution: => duplicate
* component: Uncategorized => Utilities


Comment:

This bug has been fixed in Django `2.2.1`, see
[https://docs.djangoproject.com/en/2.2/releases/2.2.1/ release notes]:

> Fixed a regression in Django 2.2 that caused a crash of runserver when
URLConf modules raised exceptions (#30323).

Duplicate of #30323.

--
Ticket URL: <https://code.djangoproject.com/ticket/30432#comment:4>

Reply all
Reply to author
Forward
0 new messages