Re: [Django] #10894: django.test.client.post does not throw exception when selected foreign key does not exists

2009-04-23 Thread Django
#10894: django.test.client.post does not throw exception when selected foreign 
key
does not exists
+---
  Reporter:  Carlos   | Owner:  nobody
Status:  closed | Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution:  wontfix|  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by carlosble):

  * status:  new => closed
  * resolution:  => wontfix

Comment:

 Good point mktracey. I thought this use case could not be performed
 through the UI as the browser does not let you pick a foreign key which is
 not in the rendered dropdow, but if there are several users accesing the
 site and one deletes the foreign key selected by the other, then you get
 same case which solution would be a redirect as you point. I am getting
 status_code 200 but I guess it is up to me to validate and get a 30x code.
 Thanks :-)

-- 
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] #10894: django.test.client.post does not throw exception when selected foreign key does not exists

2009-04-22 Thread Django
#10894: django.test.client.post does not throw exception when selected foreign 
key
does not exists
+---
  Reporter:  Carlos   | Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by kmtracey):

 You've still completely left out the view that processes the post data.
 Even without that, though, I'm not understanding why your expected
 behavior would be a runtime exception.  I wouldn't want that.  Using the
 standard form processing formula (validate form, if it's OK do whatever is
 being requested and redirect to a different page otherwise re-display the
 existing page), what you are listing as the current behavior is correct.
 Why do you expect a runtime exception?

-- 
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] #10894: django.test.client.post does not throw exception when selected foreign key does not exists

2009-04-22 Thread Django
#10894: django.test.client.post does not throw exception when selected foreign 
key
does not exists
+---
  Reporter:  Carlos   | Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Comment (by Carlos ):

 Sorry,
 Say the form has a ForeignKey. It gets rendered as a dropdown ('select' in
 html). Using django.test.client.Client.post you send a dictionary which
 key is the dropdown name but its value is a number which does not match
 any item in the foreign table.
 Better now?

 Thanks

-- 
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] #10894: django.test.client.post does not throw exception when selected foreign key does not exists

2009-04-22 Thread Django
#10894: django.test.client.post does not throw exception when selected foreign 
key
does not exists
+---
  Reporter:  Carlos   | Owner:  nobody
Status:  new| Milestone:
 Component:  Uncategorized  |   Version:  1.0   
Resolution: |  Keywords:
 Stage:  Unreviewed | Has_patch:  0 
Needs_docs:  0  |   Needs_tests:  0 
Needs_better_patch:  0  |  
+---
Changes (by ramiro):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 Can you post a simple self-contained minimal example of what you are
 reporting?. currently the report is confusing and makes hard to start
 reviewing it. You mention a a foreign key but then the code snippet
 contains a `multiselect_many2many` bit.

-- 
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
-~--~~~~--~~--~--~---



[Django] #10894: django.test.client.post does not throw exception when selected foreign key does not exists

2009-04-22 Thread Django
#10894: django.test.client.post does not throw exception when selected foreign 
key
does not exists
---+
 Reporter:  Carlos   |   Owner:  nobody
   Status:  new|   Milestone:
Component:  Uncategorized  | Version:  1.0   
 Keywords: |   Stage:  Unreviewed
Has_patch:  0  |  
---+
 client = Client()

 client.post(url, {'param1': "just_a_text", 'multiselect_many2many':
 ('1',)})


 But foreign key 1 does not exists.

 Current behavior: status code 200 plus

 Expected behavior: runtime exception

-- 
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
-~--~~~~--~~--~--~---