#18974: Deprecate models.permalink
-------------------------------------+-------------------------------------
     Reporter:  dstufft              |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |                  Version:  master
    Component:  Database layer       |               Resolution:
  (models, ORM)                      |             Triage Stage:  Design
     Severity:  Normal               |  decision needed
     Keywords:                       |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by dstufft):

 Replying to [comment:15 russellm]:
 > (4) is a case of something in widespread use, where we are deprecating
 the use of an anti-pattern (import *). We did this because Django is an
 influencer in the Python best-practices space, and Django is often
 people's first introduction to Python, so when our tutorial tells people
 to do things a bad way, it leads to problems later on.
 [[BR]]
 I guess I just don't see this change as any different than that. A
 Decorator that forces a change in function signature is an anti-pattern as
 well (even more so than import * in my opinion), and like you said Django
 is an influencer in the Python best-practices space, and their first
 introduction to Python. I don't think documentation alone is enough to
 solve this particular anti-pattern usage because people are using it in
 the wild and people will still learn from the people doing it "wrong"
 because those people learned from Django to do it wrong.
 [[BR]]

 >  2) There's a lingering discussion about actually fixing
 get_absolute_url(), which would give us a *reason* to deprecate
 @permalink. When this discussion is on the horizon, tinkering around the
 edges seems like wasted effort. If we're going to face some community
 pain, lets get community attention once, and fix the problem once, not
 attack it in lots of little passes.
 [[BR]]
 Maybe i've just missed these discussions but that page you linked too
 earlier hasn't been updated in 3 years and as far as I can tell there's
 been no discussion on django-developers about changing `get_absolute_url`
 in about 3 years as well. Unless there's some discussion i've missed
 (completely possible) it doesn't appear that anyone has been motivated to
 try and fix the supposed problems with `get_absolute_url` in quite some
 time. This patch is also somewhat tangentially related to
 `get_absolute_url` because the docs also recommend it's use anytime you
 need a function that returns an url (see
 https://docs.djangoproject.com/en/1.4/topics/http/urls/#permalink).
 [[BR]]
 [[BR]]
 However I think we're likely just going back and forth here, I'm unsure of
 what the next step would be, how do we get a decision made so we can
 either get this deprecated or get the docs fixed?

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to