Re: [Django] #10194: allow model instance as argument to HttpResponseRedirect constructor

2009-03-12 Thread Django
#10194: allow model instance as argument to HttpResponseRedirect constructor
+---
  Reporter:  Daniel Pope   | Owner:  
jacob
Status:  assigned   | Milestone:  
1.1 beta 
 Component:  HTTP handling  |   Version:  
1.0  
Resolution: |  Keywords:  
shortcut wishlist
 Stage:  Accepted   | Has_patch:  1 
   
Needs_docs:  0  |   Needs_tests:  1 
   
Needs_better_patch:  1  |  
+---
Changes (by russellm):

  * needs_better_patch:  0 => 1
  * needs_tests:  0 => 1

Comment:

 A few quick comments:
  1. The patch needs tests. This sort of thing is easily testable using the
 builtin test client.
  2. I'm not entirely clear why line 69 (the hasattr(obj,
 'get_absolute_url') and obj.get_absolute_url() or obj bit) is required. Is
 there some condition I'm missing where returning just the object would
 make sense? The only case I can think of is so you can use redirect() as a
 shortcut for HttpResponseRedirect(), but frankly, I'd rather see the
 separation of concerns maintained - HttpResposeRedirect handling a literal
 URL, and redirect handling the get_absolute_url case.
  3. There are a couple of minor PEP8 issues - most notably, extra spaces
 around function arguments. This is easy for us to fix prior to commit, but
 it would be even nicer if we didn't have to fix them :-)

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10194: allow model instance as argument to HttpResponseRedirect constructor

2009-03-10 Thread Django
#10194: allow model instance as argument to HttpResponseRedirect constructor
+---
  Reporter:  Daniel Pope   | Owner:  
jacob
Status:  assigned   | Milestone:  
1.1 beta 
 Component:  HTTP handling  |   Version:  
1.0  
Resolution: |  Keywords:  
shortcut wishlist
 Stage:  Accepted   | Has_patch:  1 
   
Needs_docs:  0  |   Needs_tests:  0 
   
Needs_better_patch:  0  |  
+---
Changes (by dcwatson):

  * has_patch:  0 => 1

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10194: allow model instance as argument to HttpResponseRedirect constructor

2009-02-28 Thread Django
#10194: allow model instance as argument to HttpResponseRedirect constructor
+---
  Reporter:  Daniel Pope   | Owner:  
jacob
Status:  assigned   | Milestone:  
1.1 beta 
 Component:  HTTP handling  |   Version:  
1.0  
Resolution: |  Keywords:  
shortcut wishlist
 Stage:  Accepted   | Has_patch:  0 
   
Needs_docs:  0  |   Needs_tests:  0 
   
Needs_better_patch:  0  |  
+---
Changes (by jacob):

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

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #10194: allow model instance as argument to HttpResponseRedirect constructor

2009-02-28 Thread Django
#10194: allow model instance as argument to HttpResponseRedirect constructor
+---
  Reporter:  Daniel Pope   | Owner:  
nobody   
Status:  new| Milestone:  
1.1 beta 
 Component:  HTTP handling  |   Version:  
1.0  
Resolution: |  Keywords:  
shortcut wishlist
 Stage:  Accepted   | Has_patch:  0 
   
Needs_docs:  0  |   Needs_tests:  0 
   
Needs_better_patch:  0  |  
+---
Changes (by jacob):

  * needs_better_patch:  => 0
  * needs_docs:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * milestone:  => 1.1 beta

Comment:

 I think `django.shortcuts.redirect` is a good idea.

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---