[Django] #34815: urls file in startapp command

9 views
Skip to first unread message

Django

unread,
Sep 6, 2023, 12:35:39 PM9/6/23
to django-...@googlegroups.com
#34815: urls file in startapp command
-------------------------------------+-------------------------------------
Reporter: Amin | Owner: nobody
Aminian |
Type: | Status: new
Cleanup/optimization |
Component: Core | Version: 4.2
(Management commands) |
Severity: Normal | Keywords: startapp
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Hi!
When using `startapp` command, Django does not create `urls.py` and I
found myself creating this file all the time.
I wanted to suggest to add this file in `startapp` process, with proper
template like this:


{{{
from django.urls import path


urlpatterns = [

]
}}}

Which can be helpful for following practices.

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

Django

unread,
Sep 6, 2023, 2:01:11 PM9/6/23
to django-...@googlegroups.com
#34815: urls file in startapp command
-------------------------------------+-------------------------------------
Reporter: Amin Aminian | Owner: Faishal
Type: | Manzar
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: 4.2
commands) |
Severity: Normal | Resolution:
Keywords: startapp | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

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

* owner: nobody => Faishal Manzar
* status: new => assigned


Old description:

> Hi!
> When using `startapp` command, Django does not create `urls.py` and I
> found myself creating this file all the time.
> I wanted to suggest to add this file in `startapp` process, with proper
> template like this:
>

> {{{
> from django.urls import path
>

> urlpatterns = [
>
> ]
> }}}
>
> Which can be helpful for following practices.

New description:

Hi!sing `
When ustartapp` command, Django does not create `urls.py` and I found


myself creating this file all the time.

I w''anted to suggest to add this file in `startapp` process, with proper
template like this:


''https://code.djangoproject.com/ticket/34815#{{{
from django.urls import path


urlpatterns = [

]
}}}

Which can be helpful for following practices.

--

Comment:

well i thinks thats a good suggestion, and also i am completely in favor
of it, before start working on this issue i think we should dicuss it in
community forum,
I feel the same issue i think 99% of time when you create a app you create
this file unless the app is very small

So i am assigning it to myself, but will start working after community
discussion

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

Django

unread,
Sep 6, 2023, 2:04:08 PM9/6/23
to django-...@googlegroups.com
#34815: urls file in startapp command
-------------------------------------+-------------------------------------
Reporter: Amin Aminian | Owner: Faishal
Type: | Manzar
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: 4.2
commands) |
Severity: Normal | Resolution:
Keywords: startapp | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Faishal Manzar:

Old description:

> Hi!sing `
> When ustartapp` command, Django does not create `urls.py` and I found
> myself creating this file all the time.
> I w''anted to suggest to add this file in `startapp` process, with proper
> template like this:
>

> ''https://code.djangoproject.com/ticket/34815#{{{
> from django.urls import path
>

> urlpatterns = [
>
> ]
> }}}
>
> Which can be helpful for following practices.

New description:

Hi!
When using `startapp` command, Django does not create `urls.py` and I
found myself creating this file all the time.

I w'anted to suggest to add this file in `startapp` process, with proper
template like this:


{{{
from django.urls import path


urlpatterns = [

]
}}}

Which can be helpful for following practices.

--

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

Django

unread,
Sep 6, 2023, 2:12:11 PM9/6/23
to django-...@googlegroups.com
#34815: urls file in startapp command
-------------------------------------+-------------------------------------
Reporter: Amin Aminian | Owner: Faishal
Type: | Manzar
Cleanup/optimization | Status: assigned
Component: Core (Management | Version: 4.2
commands) |
Severity: Normal | Resolution:
Keywords: startapp | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Amin Aminian):

Replying to [comment:1 Faishal Manzar]:


> well i thinks thats a good suggestion, and also i am completely in
favor of it, before start working on this issue i think we should dicuss
it in community forum,
> I feel the same issue i think 99% of time when you create a app you
create this file unless the app is very small
>
> So i am assigning it to myself, but will start working after community
discussion

Thanks for your comment Faishal.
But I am totally willing to do this issue by myself (after community
discussion) and have a contribution, it would be my honor.
Is it possible ?

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

Django

unread,
Sep 6, 2023, 2:28:21 PM9/6/23
to django-...@googlegroups.com
#34815: urls file in startapp command
-------------------------------------+-------------------------------------
Reporter: Amin Aminian | Owner: Faishal
Type: | Manzar
Cleanup/optimization | Status: closed

Component: Core (Management | Version: 4.2
commands) |
Severity: Normal | Resolution: duplicate

Keywords: startapp | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* status: assigned => closed
* resolution: => duplicate


Comment:

This was discussed and rejected multiple times. Duplicate of #25943.

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

Django

unread,
Sep 6, 2023, 3:45:09 PM9/6/23
to django-...@googlegroups.com
#34815: urls file in startapp command
-------------------------------------+-------------------------------------
Reporter: Amin Aminian | Owner: Faishal
Type: | Manzar
Cleanup/optimization | Status: closed
Component: Core (Management | Version: 4.2
commands) |
Severity: Normal | Resolution: duplicate
Keywords: startapp | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Faishal Manzar):

yes of course

--
Ticket URL: <https://code.djangoproject.com/ticket/34815#comment:5>

Reply all
Reply to author
Forward
0 new messages