[Django] #17697: Implement a new property as list type (like extra_argument) into the ListView class

8 views
Skip to first unread message

Django

unread,
Feb 16, 2012, 3:37:22 AM2/16/12
to django-...@googlegroups.com
#17697: Implement a new property as list type (like extra_argument) into the
ListView class
-------------------------+-------------------------------------------------
Reporter: sylock | Owner: nobody
Type: | Status: new
Uncategorized | Version: 1.3
Component: Generic | Keywords: extra_context generic views
views | listview
Severity: Normal | Has patch: 0
Triage Stage: | UI/UX: 0
Unreviewed |
Easy pickings: 0 |
-------------------------+-------------------------------------------------
Hello,

In the deprecated implementation of generic views (as functions) there was
the extra_context list to pass extra arguments to the template.
Since 1.3 and the new implementation of generic views as classes doing the
same need the creation of a new customized class which inherits from the
ListView class as documented here (in the extra_context chapter):
https://docs.djangoproject.com/en/dev/topics/generic-views-migration/#the-
context-data-for-object-list-views

It's not pythonic since the new implementation recquire more knowledge of
the underlying code, and basicaly, more code to do the same! So it's a
regression from my point of view.

It would be really simple to solve it keeping classes implementation by
creating a new property as list type. So when instanciate the ListView
class we would be able to give the extra variables as arguments.

Really need little modification to the existing code!

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

Django

unread,
Feb 16, 2012, 3:43:06 AM2/16/12
to django-...@googlegroups.com
#17697: Implement a new property as list type (like extra_argument) into the
ListView class
-------------------------------------+-------------------------------------
Reporter: sylock | Owner: nobody
Type: New feature | Status: new
Component: Generic views | Version: 1.3
Severity: Normal | Resolution:
Keywords: extra_context | Triage Stage:
generic views listview | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by sylock):

* cc: sylock (added)
* needs_docs: => 0
* type: Uncategorized => New feature
* needs_tests: => 0
* needs_better_patch: => 0


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

Django

unread,
Mar 4, 2012, 3:59:44 PM3/4/12
to django-...@googlegroups.com
#17697: Implement a new property as list type (like extra_argument) into the
ListView class
-------------------------------------+-------------------------------------
Reporter: sylock | Owner: nobody
Type: New feature | Status: new
Component: Generic views | Version: 1.3
Severity: Normal | Resolution:
Keywords: extra_context | Triage Stage:
generic views listview | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by aaugustin):

> Really need little modification to the existing code!

Would you mind attaching the changes you suggest as a diff file? That
would make it easier to assess this ticket.

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

Django

unread,
Mar 14, 2012, 5:37:17 PM3/14/12
to django-...@googlegroups.com
#17697: Implement a new property as list type (like extra_argument) into the
ListView class
-------------------------------------+-------------------------------------
Reporter: sylock | Owner: Fandekasp
Type: New feature | Status: new
Component: Generic views | Version: 1.3
Severity: Normal | Resolution:
Keywords: extra_context | Triage Stage: Accepted
generic views listview | Needs documentation: 1
Has patch: 0 | Patch needs improvement: 0
Needs tests: 1 | UI/UX: 0
Easy pickings: 1 |
-------------------------------------+-------------------------------------
Changes (by Fandekasp):

* owner: nobody => Fandekasp
* needs_docs: 0 => 1
* needs_tests: 0 => 1
* easy: 0 => 1
* stage: Unreviewed => Accepted


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

Django

unread,
Mar 14, 2012, 5:37:36 PM3/14/12
to django-...@googlegroups.com
#17697: Implement a new property as list type (like extra_argument) into the
ListView class
-------------------------------------+-------------------------------------
Reporter: sylock | Owner: Fandekasp
Type: New feature | Status: new
Component: Generic views | Version: 1.3
Severity: Normal | Resolution:
Keywords: extra_context | Triage Stage: Accepted
generic views listview | Needs documentation: 1
Has patch: 0 | Patch needs improvement: 0
Needs tests: 1 | UI/UX: 0
Easy pickings: 1 |
-------------------------------------+-------------------------------------
Changes (by Fandekasp):

* cc: lemaire.adrien@… (added)


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

Django

unread,
Mar 14, 2012, 5:55:55 PM3/14/12
to django-...@googlegroups.com
#17697: Implement a new property as list type (like extra_argument) into the
ListView class
-------------------------------------+-------------------------------------
Reporter: sylock | Owner: Fandekasp
Type: New feature | Status: new
Component: Generic views | Version: 1.3
Severity: Normal | Resolution:
Keywords: extra_context | Triage Stage: Design
generic views listview | decision needed
Has patch: 0 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Fandekasp):

* stage: Accepted => Design decision needed


Comment:

I think it would be a good idea to add back the extra_context kwarg, that
would allow a user to give the extra context in the urls.py directly for
small views.

The extra_context has to be a dict @sylock, you need to specify the key
and value for that extra context.

Nevertheless, there might be a good reason why that extra_context field
has been removed from the function based views to class based views, so
I'd like a core developer to confirm whereas I can work on that new
feature or not. I'll have to change several parts of the doc as well, so
maybe I'll have to add a note in the release/1.4.txt, or 1.5-alpha-1.txt
if we're not gonna add that patch in 1.4.

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

Django

unread,
May 12, 2012, 1:48:21 AM5/12/12
to django-...@googlegroups.com
#17697: Implement a new property as list type (like extra_argument) into the
ListView class
-------------------------------------+-------------------------------------
Reporter: sylock | Owner: Fandekasp
Type: New feature | Status: closed
Component: Generic views | Version: 1.3
Severity: Normal | Resolution: needsinfo
Keywords: extra_context | Triage Stage: Design
generic views listview | decision needed
Has patch: 0 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

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


Comment:

Without code, I'm not sure what changes are requested by this ticket.
Please create a patch or a pull request.

--
Ticket URL: <https://code.djangoproject.com/ticket/17697#comment:6>

Django

unread,
Jun 22, 2017, 9:08:57 AM6/22/17
to django-...@googlegroups.com
#17697: Implement a new property as list type (like extra_argument) into the
ListView class
-------------------------------------+-------------------------------------
Reporter: sylock | Owner: Adrien
| Lemaire

Type: New feature | Status: closed
Component: Generic views | Version: 1.3
Severity: Normal | Resolution: needsinfo
Keywords: extra_context | Triage Stage: Design
generic views listview | decision needed
Has patch: 0 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

I accepted a ticket for this in #28331.

--
Ticket URL: <https://code.djangoproject.com/ticket/17697#comment:7>

Reply all
Reply to author
Forward
0 new messages