Re: [Django] #13223: ValueError with inline and save as new

2015-05-25 Thread Django
#13223: ValueError with inline and save as new
+-
 Reporter:  lucalenardi |Owner:  igors
 Type:  Bug |   Status:  closed
Component:  contrib.admin   |  Version:  1.1
 Severity:  Normal  |   Resolution:  duplicate
 Keywords:  admin, save-as-new  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  1
Easy pickings:  0   |UI/UX:  0
+-
Changes (by timgraham):

 * status:  assigned => closed
 * resolution:   => duplicate


Comment:

 Duplicate of #23387 which has been fixed in master (1.9) by only showing
 the "Save as new" button if it's selected and there are validation errors.

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.835207d70b93a2095f2ad947358088dc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #13223: ValueError with inline and save as new

2013-09-10 Thread Django
#13223: ValueError with inline and save as new
+
 Reporter:  lucalenardi |Owner:  igors
 Type:  Bug |   Status:  assigned
Component:  contrib.admin   |  Version:  1.1
 Severity:  Normal  |   Resolution:
 Keywords:  admin, save-as-new  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  1
Easy pickings:  0   |UI/UX:  0
+
Changes (by samstudio8@…):

 * cc: samstudio8@… (added)


-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.fb3465dfe720b93552d3a885d8b1a810%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [Django] #13223: ValueError with inline and save as new

2013-05-10 Thread Django
#13223: ValueError with inline and save as new
+
 Reporter:  lucalenardi |Owner:  igors
 Type:  Bug |   Status:  assigned
Component:  contrib.admin   |  Version:  1.1
 Severity:  Normal  |   Resolution:
 Keywords:  admin, save-as-new  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  1
Easy pickings:  0   |UI/UX:  0
+

Comment (by igors):

 Sorry for the broken link @dakinsloss. Since the review/feedback was
 running to slow I ended up hacking it as an external app.

 https://github.com/RealGeeks/django-modelclone

 It's basically the intermediate 'clone' view, same form as 'add_view' but
 already pre-populated.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #13223: ValueError with inline and save as new

2013-05-10 Thread Django
#13223: ValueError with inline and save as new
+
 Reporter:  lucalenardi |Owner:  igors
 Type:  Bug |   Status:  assigned
Component:  contrib.admin   |  Version:  1.1
 Severity:  Normal  |   Resolution:
 Keywords:  admin, save-as-new  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  1
Easy pickings:  0   |UI/UX:  0
+

Comment (by dakinsloss):

 Did anyone else pick this up? The github link above has disappeared to try
 and pick up his line of work.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #13223: ValueError with inline and save as new

2013-05-10 Thread Django
#13223: ValueError with inline and save as new
+
 Reporter:  lucalenardi |Owner:  igors
 Type:  Bug |   Status:  assigned
Component:  contrib.admin   |  Version:  1.1
 Severity:  Normal  |   Resolution:
 Keywords:  admin, save-as-new  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  1
Easy pickings:  0   |UI/UX:  0
+

Comment (by anonymous):

 Did anyone else pick this up? The github link above has disappeared to try
 and pick up his line of work.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #13223: ValueError with inline and save as new

2012-03-04 Thread Django
#13223: ValueError with inline and save as new
+
 Reporter:  lucalenardi |Owner:  igors
 Type:  Bug |   Status:  assigned
Component:  contrib.admin   |  Version:  1.1
 Severity:  Normal  |   Resolution:
 Keywords:  admin, save-as-new  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  1
Easy pickings:  0   |UI/UX:  0
+

Comment (by igors):

 I'm pushing small commits to my git fork:
 https://github.com/igorsobreira/django/commits/master (if anyone is
 interesting in follow or review step-by-step).

 When I'm done I'll attach the full patch here.

-- 
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] #13223: ValueError with inline and save as new

2012-02-12 Thread Django
#13223: ValueError with inline and save as new
+
 Reporter:  lucalenardi |Owner:  igors
 Type:  Bug |   Status:  assigned
Component:  contrib.admin   |  Version:  1.1
 Severity:  Normal  |   Resolution:
 Keywords:  admin, save-as-new  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  1
Easy pickings:  0   |UI/UX:  0
+
Changes (by igors):

 * cc: igor@… (added)


-- 
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] #13223: ValueError with inline and save as new

2012-02-12 Thread Django
#13223: ValueError with inline and save as new
+
 Reporter:  lucalenardi |Owner:  igors
 Type:  Bug |   Status:  assigned
Component:  contrib.admin   |  Version:  1.1
 Severity:  Normal  |   Resolution:
 Keywords:  admin, save-as-new  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  1
Easy pickings:  0   |UI/UX:  0
+
Changes (by igors):

 * status:  new => assigned
 * owner:   => igors


Comment:

 I was wondering how this intermediate view could be implemented.

 The idea is to replace the "Save as New" button for a link to a clone/
 view. This view would present a pre-filled form with the data from the
 original object you'd like to clone. It's (very) similar to {{{ add_view
 }}}, but using {{{ initial }}} to fill the form based on the original
 object.
 The formsets are also pre-filled using {{{ initial }}}.

 All of this happens on GET. POSTing is the same as {{{ add_view}}}'s POST.

 This is the same to call {{{ add_view }}} passing initial values as GET
 parameters. But I think a clone/ url is much cleaner.

 Let me know if I'm on the right track so I can continue with the
 implementation. It's ugly with lot's of duplication and incomplete at this
 moment, the patch is just a prototype. But I need some feedback before
 moving on...

-- 
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] #13223: ValueError with inline and save as new

2012-01-05 Thread Django
#13223: ValueError with inline and save as new
+
 Reporter:  lucalenardi |Owner:
 Type:  Bug |   Status:  new
Component:  contrib.admin   |  Version:  1.1
 Severity:  Normal  |   Resolution:
 Keywords:  admin, save-as-new  | Triage Stage:  Accepted
Has patch:  1   |  Needs documentation:  0
  Needs tests:  0   |  Patch needs improvement:  1
Easy pickings:  0   |UI/UX:  0
+
Changes (by ramiro):

 * needs_better_patch:  0 => 1


Comment:

 I've attached an updates version of the patch that simply allows it to
 apply cleanly in trunk.

 But th OP in ticket #17417 (slightly related to this one) makes a good
 point regarding the current buggy behavior and that isn't fixed by this
 patch:

 ''If you press "Save as New" without changing the slug field a
 ValidationError? is raised, and the for is displayed to the user with a
 warning (as it should). However, '''the url is that of the old entity'''
 ...''

 That means that at that point the user is presented with the admin add
 view/form for a new instance of the model, pre-filled with values of the
 original instance (the one whose edit view/form she was looking at when
 she decided to press the ''Save as new'' button) but the URL in the
 browser address bar hasn't changed.

 IMHO this is semantically incorrect and puts comment:5 in a new
 perspective. Perhaps we need to implement an intermediate view as
 suggested there?

-- 
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] #13223: ValueError with inline and save as new

2011-08-03 Thread Django
#13223: ValueError with inline and save as new
-+-
   Reporter: |  Owner:  gptvnt
  lucalenardi| Status:  assigned
   Type:  Bug|  Component:  contrib.admin
  Milestone: |   Severity:  Normal
Version:  1.1|   Keywords:  admin, save-as-new
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  0
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-

Comment (by ramiro):

 Replying to [comment:14 candlerb]:
 > I have a related problem:
 >
 > * model admin has `save_as = True`
 > * browse to existing model, click "Save as new"
 > * the model fails to validate (e.g. because of a failed uniqueness
 constraint)
 > * when the form is redisplayed with the error, I see "Save and add
 another" instead of "Save as new"
 >
 > This behaviour still remains after applying 13223.templatefix.diff (onto
 released django-1.3), although I've not tried any of the other patches in
 this thread.
 >

 This would be #5681 -- In particular, look at this [ticket:5681#comment:4
 comment] for some discussion about why that behavior isn't wrong IMHO.

-- 
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] #13223: ValueError with inline and save as new

2011-08-02 Thread Django
#13223: ValueError with inline and save as new
-+-
   Reporter: |  Owner:  gptvnt
  lucalenardi| Status:  assigned
   Type:  Bug|  Component:  contrib.admin
  Milestone: |   Severity:  Normal
Version:  1.1|   Keywords:  admin, save-as-new
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  0
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-
Changes (by Andrew Macgregor ):

 * cc: andrew@… (added)


-- 
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] #13223: ValueError with inline and save as new

2011-06-24 Thread Django
#13223: ValueError with inline and save as new
-+-
   Reporter: |  Owner:  gptvnt
  lucalenardi| Status:  assigned
   Type:  Bug|  Component:  contrib.admin
  Milestone: |   Severity:  Normal
Version:  1.1|   Keywords:  admin, save-as-new
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  0
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-
Changes (by candlerb):

 * ui_ux:   => 0


Comment:

 I have a related problem:

 * model admin has `save_as = True`
 * browse to existing model, click "Save as new"
 * the model fails to validate (e.g. because of a failed uniqueness
 constraint)
 * when the form is redisplayed with the error, I see "Save and add
 another" instead of "Save as new"

 This behaviour still remains after applying 13223.templatefix.diff (onto
 released django-1.3), although I've not tried any of the other patches in
 this thread.

 (Platform: python 2.6.5, Ubuntu 10.04.2 LTS)

-- 
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] #13223: ValueError with inline and save as new

2011-05-24 Thread Django
#13223: ValueError with inline and save as new
-+-
   Reporter: |  Owner:  gptvnt
  lucalenardi| Status:  assigned
   Type:  Bug|  Component:  contrib.admin
  Milestone: |   Severity:  Normal
Version:  1.1|   Keywords:  admin, save-as-new
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  0
Patch needs improvement:  0  |
-+-

Comment (by prestontimmons):

 After some more testing of 13223.v2.diff, I found one problem with it.
 Since it doesn't bind posted data to the management form, when the form is
 redisplayed it loses inline data if you add more blocks than the initial
 form count at the same time you use "save as new".

 The newer patch that maintains "_saveasnew" in the template doesn't suffer
 from that problem.

-- 
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] #13223: ValueError with inline and save as new

2011-05-24 Thread Django
#13223: ValueError with inline and save as new
-+-
   Reporter: |  Owner:  gptvnt
  lucalenardi| Status:  assigned
   Type:  Bug|  Component:  contrib.admin
  Milestone: |   Severity:  Normal
Version:  1.1|   Keywords:  admin, save-as-new
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  0
Patch needs improvement:  0  |
-+-

Comment (by prestontimmons):

 Thanks, Kevin. I verified your new patch fixes the problem.

 I'm hesitant to mark it ready for check-in. The "save_as_new" property is
 really a part of BaseInlineFormSet. Adding a check for it in BaseFormSet
 seems wrong. It might be more appropriate to put this fix in a custom
 "_management_form" method on the BaseInlineFormSet instead.

 I'm also attaching a separate patch. Instead of modifying the formset
 classes it modifies the add_view method to post the value "_saveasnew" on
 subsequent requests, even when form errors appear. When the form is
 redisplayed the admin switches from the change_view to the add_view and
 loses this piece of information in the process.

 I'm not sure what the best solution is.

-- 
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] #13223: ValueError with inline and save as new

2011-05-21 Thread Django
#13223: ValueError with inline and save as new
-+-
   Reporter: |  Owner:  gptvnt
  lucalenardi| Status:  assigned
   Type:  Bug|  Component:  contrib.admin
  Milestone: |   Severity:  Normal
Version:  1.1|   Keywords:  admin, save-as-new
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  0
Patch needs improvement:  0  |
-+-
Changes (by anonymous):

 * needs_better_patch:  1 => 0


Comment:

 OK, let's try this again.

-- 
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] #13223: ValueError with inline and save as new

2011-05-08 Thread Django
#13223: ValueError with inline and save as new
-+-
   Reporter: |  Owner:  gptvnt
  lucalenardi| Status:  assigned
   Type:  Bug|  Component:  contrib.admin
  Milestone: |   Severity:  Normal
Version:  1.1|   Keywords:  admin, save-as-new
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  0
Patch needs improvement:  1  |
-+-
Changes (by prestontimmons):

 * needs_better_patch:  0 => 1


Comment:

 Hi Kevin,

 Thanks for putting a patch together. I tested it out. It applies cleanly
 to revision 16181 and seems to fix the issue here, but the changes to
 django/forms/formsets.py introduce problems into the model formsets:

 {{{#!python
 ERROR: test_add_form_deletion_when_invalid
 (modeltests.model_formsets.tests.DeletionTests)
 ...
 AttributeError: 'PoetFormFormSet' object has no attribute 'save_as_new'
 }}}

 I'm marking this one as needing improvement.

-- 
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] #13223: ValueError with inline and save as new

2011-05-01 Thread Django
#13223: ValueError with inline and save as new
-+-
   Reporter: |  Owner:  gptvnt
  lucalenardi| Status:  assigned
   Type:  Bug|  Component:  contrib.admin
  Milestone: |   Severity:  Normal
Version:  1.1|   Keywords:  admin, save-as-new
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  0
Patch needs improvement:  0  |
-+-
Changes (by kevin1024):

 * cc: kevin1024 (added)
 * has_patch:  0 => 1
 * easy:   => 0


Comment:

 OK, I spent some time hacking on this today.  Here is a patch.  Be gentle;
 it's my first contribution to Django. :)

-- 
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] #13223: ValueError with inline and save as new

2011-02-09 Thread Django
#13223: ValueError with inline and save as new
+---
   Reporter:  lucalenardi   | Owner:  gptvnt

 Status:  assigned  | Milestone:

  Component:  django.contrib.admin  |   Version:  1.1   

 Resolution:|  Keywords:  admin, 
save-as-new
   Triage Stage:  Accepted  | Has patch:  0 

Needs documentation:  0 |   Needs tests:  0 

Patch needs improvement:  0 |  
+---

Comment (by sirpengi):

 I've concluded that the error is related to the id_blahinline_set-
 INITIAL_FORMS being set to anything but 0.  Using firebug to clear this
 value to 0 and saving (after validation errors) results in a new copy.

-- 
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] #13223: ValueError with inline and save as new

2010-11-25 Thread Django
#13223: ValueError with inline and save as new
---+
  Reporter:  lucalenardi   | Owner:  gptvnt
Status:  assigned  | Milestone:
 Component:  django.contrib.admin  |   Version:  1.1   
Resolution:|  Keywords:  admin, save-as-new
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by paulos):

 Replying to [comment:3 gptvnt]:

 I think the most reliable way to correct this is creating a new admin URL
 like:

  {{app_name}}/{{model_name}}/{{id}}/save_as/

 or

  {{app_name}}/{{model_name}}/clone/{{id}}/

-- 
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-upda...@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] #13223: ValueError with inline and save as new

2010-11-22 Thread Django
#13223: ValueError with inline and save as new
---+
  Reporter:  lucalenardi   | Owner:  gptvnt
Status:  assigned  | Milestone:
 Component:  django.contrib.admin  |   Version:  1.1   
Resolution:|  Keywords:  admin, save-as-new
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by paulos):

 If inline formset contains an image or file field, form will always fail
 to validate on save_as (#14760).

-- 
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-upda...@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] #13223: ValueError with inline and save as new

2010-10-17 Thread Django
#13223: ValueError with inline and save as new
---+
  Reporter:  lucalenardi   | Owner:  gptvnt
Status:  assigned  | Milestone:
 Component:  django.contrib.admin  |   Version:  1.1   
Resolution:|  Keywords:  admin, save-as-new
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by gptvnt):

  * owner:  nobody => gptvnt
  * 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-upda...@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] #13223: ValueError with inline and save as new

2010-03-27 Thread Django
#13223: ValueError with inline and save as new
---+
  Reporter:  lucalenardi   | Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  1.1   
Resolution:|  Keywords:  admin, save-as-new
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by lucalenardi):

 The error appears to be related with the value of {{{save_as_new}}} in
 {{{options.py}}} around line
 
[http://code.djangoproject.com/browser/django/tags/releases/1.1.1/django/contrib/admin/options.py#L730
 730].

 When the form is submitted the first time, it is set to {{{True}}}, while
 the second time, after the validation errors, it is set to {{{False}}}
 since it actually creates a new object. Forcing the value to {{{True}}},
 the object is being saved without exceptions (as expected).

-- 
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-upda...@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] #13223: ValueError with inline and save as new

2010-03-26 Thread Django
#13223: ValueError with inline and save as new
---+
  Reporter:  lucalenardi   | Owner:  nobody
Status:  new   | Milestone:
 Component:  django.contrib.admin  |   Version:  1.1   
Resolution:|  Keywords:  admin, save-as-new
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by kmtracey):

  * needs_better_patch:  => 0
  * stage:  Unreviewed => Accepted
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 #10448 was an earlier ticket in the same area, but it does not seem to
 have addressed the inline issue.

-- 
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-upda...@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] #13223: ValueError with inline and save as new

2010-03-26 Thread Django
#13223: ValueError with inline and save as new
--+-
 Reporter:  lucalenardi   |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  django.contrib.admin  | Version:  1.1   
 Keywords:  admin, save-as-new|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 Given two models that are related to each other with a foreign key, as
 follows:

 {{{
 class Post(models.Model):
 title = models.CharField()
 slug = models.CharField(max_length=200, unique = True)

 class Block(models.Model):
 post = models.ForeignKey(Post)
 slug = models.CharField(max_length=200, unique = True)
 }}}

 Suppose you have set {{{ save_as = true }}} in the admin.py for the class
 PostAdmin. When you try to create a new Post, generated from an existing
 one with the "save as new" button after correcting some validation errors,
 the following exception is being generated:
 {{{ ValueError: invalid literal for int() with base 10: '' }}}

 If you take a look at the request POST parameters, you could find some
 empty values for the block_set-N-post block_set-N-id (FK and id).

 To replicate the error, follow this sequence:

   1. Create a new object with at least one inline
   2. Save it as new with some validation errors
   3. Try to save it again, after correcting the errors of the form

-- 
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-upda...@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.