Django

Code

Ticket #4221 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

tutorial 4 uses hardcoded, absolute URL instead of get_absolute_url() or permalink()

Reported by: anonymous Assigned to: jacob
Milestone: Component: Documentation
Version: SVN Keywords:
Cc: Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 1

Description

Tutorial 3 makes a big deal of not using absolute urls in an application. Then tutorial 4 includes an absolute URL in views.vote :(

return HttpResponseRedirect?('/polls/%s/results/' % p.id)

Shouldn't it be using something like get_absolute_url instead?

Attachments

Change History

05/04/07 20:13:00 changed by Simon G. <dev@simon.net.nz>

  • needs_better_patch set to 1.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

05/27/07 08:41:10 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(In [5368]) Fixed #4221 -- Removed dependence on hard-coded URL in tutorial 4.


Add/Change #4221 (tutorial 4 uses hardcoded, absolute URL instead of get_absolute_url() or permalink())




Change Properties
Action