[Django] #26028: Improve instructions for overloading Django templates

16 views
Skip to first unread message

Django

unread,
Jan 3, 2016, 11:44:50 AM1/3/16
to django-...@googlegroups.com
#26028: Improve instructions for overloading Django templates
-------------------------------+--------------------
Reporter: pydanny | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
For dj-stripe, I get asked how to do this a lot. Rather than include
instructions on how to do this in that third-party package, shouldn't this
be improved in the core documentation?

Reference discussion: https://github.com/pydanny/dj-
stripe/pull/254#issuecomment-168515982

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

Django

unread,
Jan 3, 2016, 11:46:21 AM1/3/16
to django-...@googlegroups.com
#26028: Improve instructions for overloading Django templates
-------------------------------+--------------------------------------

Reporter: pydanny | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by pydanny):

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


Old description:

> For dj-stripe, I get asked how to do this a lot. Rather than include
> instructions on how to do this in that third-party package, shouldn't
> this be improved in the core documentation?
>
> Reference discussion: https://github.com/pydanny/dj-
> stripe/pull/254#issuecomment-168515982

New description:

For dj-stripe, I get asked how to do this a lot. Rather than include
instructions on how to do this in that third-party package, shouldn't this
be improved in the core documentation?

Reference discussion: https://github.com/pydanny/dj-
stripe/pull/254#issuecomment-168515982

Current status of instructions:

* Somewhere in the tutorials
*
https://docs.djangoproject.com/en/1.9/ref/templates/api/#django.template.loaders.app_directories.Loader
(arguably obtuse)

--

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

Django

unread,
Jan 3, 2016, 11:46:51 AM1/3/16
to django-...@googlegroups.com
#26028: Improve instructions for overloading Django templates
-------------------------------+--------------------------------------

Reporter: pydanny | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | 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 pydanny:

Old description:

> For dj-stripe, I get asked how to do this a lot. Rather than include
> instructions on how to do this in that third-party package, shouldn't
> this be improved in the core documentation?
>
> Reference discussion: https://github.com/pydanny/dj-
> stripe/pull/254#issuecomment-168515982
>

> Current status of instructions:
>
> * Somewhere in the tutorials
> *
> https://docs.djangoproject.com/en/1.9/ref/templates/api/#django.template.loaders.app_directories.Loader
> (arguably obtuse)

New description:

For dj-stripe, I get asked how to do this a lot. Rather than include
instructions on how to do this in that third-party package, shouldn't this
be improved in the core documentation?

Reference discussion: https://github.com/pydanny/dj-
stripe/pull/254#issuecomment-168515982

Existing instructions on template overloading:

--

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

Django

unread,
Jan 3, 2016, 11:53:36 AM1/3/16
to django-...@googlegroups.com
#26028: Improve instructions for overloading Django templates
-------------------------------+--------------------------------------

Reporter: pydanny | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by pydanny):

Tutorial location: https://docs.djangoproject.com/en/1.9/intro/tutorial07
/#customizing-your-application-s-templates

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

Django

unread,
Jan 3, 2016, 7:25:34 PM1/3/16
to django-...@googlegroups.com
#26028: Improve instructions for overloading Django templates
-------------------------------+--------------------------------------

Reporter: pydanny | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by cjrh):

When I was researching how to customize third-party apps, I found this
blog entry very useful for a rapid overview:

http://blog.yourlabs.org/post/19777151073/how-to-override-a-view-from-an-
external-django-app

I also recently discovered this third-party app loader that allows one to
extend templates, rather than replace them completely:

https://pypi.python.org/pypi/django-apptemplates/

From IRC discussions, it sounds like quite a few experienced people use
forking for customization. It would be good to have clear guidelines
about how to avoid forking , as well as guidelines on how to correctly do
forking when you really have to.

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

Django

unread,
Jan 4, 2016, 6:49:51 AM1/4/16
to django-...@googlegroups.com
#26028: Improve instructions for overloading Django templates
-------------------------------+------------------------------------
Reporter: pydanny | Owner: nobody
Type: New feature | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by timgraham):

* type: Uncategorized => New feature
* stage: Unreviewed => Accepted


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

Django

unread,
Jan 4, 2016, 6:58:22 AM1/4/16
to django-...@googlegroups.com
#26028: Improve instructions for overriding Django templates
-------------------------------+------------------------------------
Reporter: pydanny | Owner: nobody
Type: New feature | Status: new
Component: Documentation | Version: 1.9

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Description changed by timgraham:

Old description:

> For dj-stripe, I get asked how to do this a lot. Rather than include
> instructions on how to do this in that third-party package, shouldn't
> this be improved in the core documentation?
>
> Reference discussion: https://github.com/pydanny/dj-
> stripe/pull/254#issuecomment-168515982
>

> Existing instructions on template overloading:
>
> * Somewhere in the tutorials
> *
> https://docs.djangoproject.com/en/1.9/ref/templates/api/#django.template.loaders.app_directories.Loader
> (arguably obtuse)

New description:

For dj-stripe, I get asked how to do this a lot. Rather than include
instructions on how to do this in that third-party package, shouldn't this
be improved in the core documentation?

Reference discussion: https://github.com/pydanny/dj-
stripe/pull/254#issuecomment-168515982

Existing instructions on template overriding:

* In the tutorial: https://docs.djangoproject.com/en/1.9/intro/tutorial07
/#customizing-your-application-s-templates

--

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

Django

unread,
Jun 3, 2016, 7:20:51 PM6/3/16
to django-...@googlegroups.com
#26028: Improve instructions for overriding Django templates
-------------------------------+------------------------------------
Reporter: pydanny | Owner: phildini
Type: New feature | Status: assigned
Component: Documentation | Version: 1.9

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by phildini):

* owner: nobody => phildini
* status: new => assigned


Comment:

I'm very interested in making this better as I use this pattern all the
time. Any tips on where this doc should live would be helpful, I'll also
make a best guess in a PR soon, hopefully.

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

Django

unread,
Jun 4, 2016, 2:54:50 PM6/4/16
to django-...@googlegroups.com
#26028: Improve instructions for overriding Django templates
-------------------------------+------------------------------------
Reporter: pydanny | Owner: phildini
Type: New feature | Status: assigned
Component: Documentation | Version: 1.9

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by phildini):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/26028#comment:8>

Django

unread,
Jun 12, 2016, 1:51:12 AM6/12/16
to django-...@googlegroups.com
#26028: Improve instructions for overriding Django templates
-------------------------------+------------------------------------
Reporter: pydanny | Owner: phildini
Type: New feature | Status: assigned
Component: Documentation | Version: 1.9

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by berkerpeksag):

* cc: berker.peksag@… (added)
* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/26028#comment:9>

Django

unread,
Jul 25, 2016, 7:27:06 AM7/25/16
to django-...@googlegroups.com
#26028: Improve instructions for overriding Django templates
-------------------------------+------------------------------------
Reporter: pydanny | Owner: phildini
Type: New feature | Status: assigned
Component: Documentation | Version: 1.9

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/26028#comment:10>

Django

unread,
May 23, 2017, 4:36:35 PM5/23/17
to django-...@googlegroups.com
#26028: Improve instructions for overriding Django templates
----------------------------------+----------------------------------------
Reporter: Daniel Greenfeld | Owner: Philip James

Type: New feature | Status: assigned
Component: Documentation | Version: 1.9

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+----------------------------------------
Changes (by Philip James):

* needs_better_patch: 1 => 0

Django

unread,
May 24, 2017, 1:42:36 PM5/24/17
to django-...@googlegroups.com
#26028: Improve instructions for overriding Django templates
----------------------------------+----------------------------------------
Reporter: Daniel Greenfeld | Owner: Philip James
Type: New feature | Status: assigned
Component: Documentation | Version: 1.9

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
----------------------------------+----------------------------------------

Comment (by Philip James):

Gentle ping: All the tests have passed, and I think the relevant feedback
has been captured in the PR.

--
Ticket URL: <https://code.djangoproject.com/ticket/26028#comment:11>

Django

unread,
May 24, 2017, 1:56:52 PM5/24/17
to django-...@googlegroups.com
#26028: Improve instructions for overriding Django templates
-------------------------------------+-------------------------------------

Reporter: Daniel Greenfeld | Owner: Philip
| James
Type: New feature | Status: assigned
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Berker Peksag):

* stage: Accepted => Ready for checkin


Comment:

I just reviewed the last version the PR and it looks like all of my
previous review comments have been addressed. I left two minor comments on
GitHub, otherwise it looks pretty good to me. Thank you!

--
Ticket URL: <https://code.djangoproject.com/ticket/26028#comment:12>

Django

unread,
Jun 2, 2017, 6:18:19 PM6/2/17
to django-...@googlegroups.com
#26028: Improve instructions for overriding Django templates
-------------------------------------+-------------------------------------
Reporter: Daniel Greenfeld | Owner: Philip
| James
Type: New feature | Status: closed
Component: Documentation | Version: 1.9
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"7c9a83330169df1118f6bd690aed131e7c59638d" 7c9a8333]:
{{{
#!CommitTicketReference repository=""
revision="7c9a83330169df1118f6bd690aed131e7c59638d"
Fixed #26028 -- Added overriding templates howto.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26028#comment:13>

Django

unread,
Jun 2, 2017, 6:24:27 PM6/2/17
to django-...@googlegroups.com
#26028: Improve instructions for overriding Django templates
-------------------------------------+-------------------------------------
Reporter: Daniel Greenfeld | Owner: Philip
| James
Type: New feature | Status: closed
Component: Documentation | Version: 1.9

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"34ea3d61af2361c1ed2f4f0709d59c9a64bb866c" 34ea3d6]:
{{{
#!CommitTicketReference repository=""
revision="34ea3d61af2361c1ed2f4f0709d59c9a64bb866c"
[1.11.x] Fixed #26028 -- Added overriding templates howto.

Backport of 7c9a83330169df1118f6bd690aed131e7c59638d from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26028#comment:14>

Reply all
Reply to author
Forward
0 new messages