Tim Chase wrote:
Well, if you define a get_absolute_url() method on your model,
according to

http://www.djangoproject.com/documentation/model-api/#get-absolute-url

it will add a link to the admin page for you.  However, this
makes a bit of a grating abuse of the system, as it is _supposed_
to be the URL for this object.
Thats a good idea, and I would do that, but the print view isn't the url for the model. It is an admin-only view. Normal users will be able to see what get_absolute_url() should return. The template fix is my next best solution. I guess one way to do it would be to gave the url returned get_absolute_url() determine if the request is from an admin user, and issue a redirect to either the normal or print view.

I'm interested in hearing any more ideas that might be out there. Until I do, I'll probably go ahead and use the redirect trick, or even have a landing page so the admin can choose to view or print.

Thanks!

Jeff Anderson

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to