Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#26028 closed New feature (fixed)

Improve instructions for overriding Django templates

Reported by: Daniel Greenfeld Owned by: Philip James
Component: Documentation Version: 1.9
Severity: Normal Keywords:
Cc: berker.peksag@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

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:

Change History (13)

comment:1 by Daniel Greenfeld, 9 years ago

Description: modified (diff)

comment:2 by Daniel Greenfeld, 9 years ago

Description: modified (diff)

comment:4 by Caleb Hattingh, 9 years ago

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.

comment:5 by Tim Graham, 9 years ago

Triage Stage: UnreviewedAccepted
Type: UncategorizedNew feature

comment:6 by Tim Graham, 9 years ago

Description: modified (diff)
Summary: Improve instructions for overloading Django templatesImprove instructions for overriding Django templates

comment:7 by Philip James, 9 years ago

Owner: changed from nobody to Philip James
Status: newassigned

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.

comment:8 by Philip James, 9 years ago

Has patch: set
Last edited 9 years ago by Tim Graham (previous) (diff)

comment:9 by Berker Peksag, 9 years ago

Cc: berker.peksag@… added
Patch needs improvement: set

comment:10 by Philip James, 8 years ago

Patch needs improvement: unset

comment:11 by Philip James, 8 years ago

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

comment:12 by Berker Peksag, 8 years ago

Triage Stage: AcceptedReady for checkin

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!

comment:13 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In 7c9a8333:

Fixed #26028 -- Added overriding templates howto.

comment:14 by Tim Graham <timograham@…>, 8 years ago

In 34ea3d6:

[1.11.x] Fixed #26028 -- Added overriding templates howto.

Backport of 7c9a83330169df1118f6bd690aed131e7c59638d from master

Note: See TracTickets for help on using tickets.
Back to Top