Re: [Django] #14938: "Save as" does not save entries added with a TabularInline

2011-01-05 Thread Django
#14938: "Save as" does not save entries added with a TabularInline
---+
  Reporter:  rax   | Owner:  nobody 
 
Status:  new   | Milestone:  1.3
 
 Component:  django.contrib.admin  |   Version:  1.2-beta   
 
Resolution:|  Keywords:  save-as, blocker, 
regression
 Stage:  Accepted  | Has_patch:  1  
 
Needs_docs:  0 |   Needs_tests:  1  
 
Needs_better_patch:  1 |  
---+
Changes (by russellm):

  * keywords:  save-as => save-as, blocker, regression

-- 
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] #14938: "Save as" does not save entries added with a TabularInline

2011-01-04 Thread Django
#14938: "Save as" does not save entries added with a TabularInline
---+
  Reporter:  rax   | Owner:  nobody  
Status:  new   | Milestone:  1.3 
 Component:  django.contrib.admin  |   Version:  1.2-beta
Resolution:|  Keywords:  save-as 
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  1   
Needs_better_patch:  1 |  
---+
Old description:

> '''What steps will reproduce the problem?'''
> 1. go to the admin change form of an instance of a model class with both
> the "save as" feature enabled, and a TabularInline for relate items.
> 2. change the original instance
> 3. add a new related instance using the TabularInline
>
> '''What is the expected output? What do you see instead?'''
> A new instance should be created, a copy of all the related instances
> should be created and a new instance for any item added in the
> TabularInline should be created.
> Instead the original item is created, all the pre-existing instances are
> copied but the new ones are not created.
>
> Note: deleting an entry works as expected is just the add that "fails" by
> creating the new instance without adding the new related items.
>
> '''Additional information'''
> django version: 1.2.3
> locale: it-IT
>
> this may also be related to [http://code.djangoproject.com/ticket/4045]

New description:

 '''What steps will reproduce the problem?'''

  1. go to the admin change form of an instance of a model class with both
 the "save as" feature enabled, and a TabularInline for relate items.
  2. change the original instance
  3. add a new related instance using the TabularInline

 '''What is the expected output? What do you see instead?'''

 A new instance should be created, a copy of all the related instances
 should be created and a new instance for any item added in the
 TabularInline should be created.
 Instead the original item is created, all the pre-existing instances are
 copied but the new ones are not created.

 Note: deleting an entry works as expected is just the add that "fails" by
 creating the new instance without adding the new related items.

 '''Additional information'''

 django version: 1.2.3
 locale: it-IT

 this may also be related to #4045

Comment (by ramiro):

 (reformatted description)

-- 
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] #14938: "Save as" does not save entries added with a TabularInline

2010-12-26 Thread Django
#14938: "Save as" does not save entries added with a TabularInline
---+
  Reporter:  rax   | Owner:  nobody  
Status:  new   | Milestone:  1.3 
 Component:  django.contrib.admin  |   Version:  1.2-beta
Resolution:|  Keywords:  save-as 
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  1   
Needs_better_patch:  1 |  
---+
Comment (by julien):

 #14949 was closed as dupe.

-- 
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] #14938: "Save as" does not save entries added with a TabularInline

2010-12-26 Thread Django
#14938: "Save as" does not save entries added with a TabularInline
---+
  Reporter:  rax   | Owner:  nobody  
Status:  new   | Milestone:  1.3 
 Component:  django.contrib.admin  |   Version:  1.2-beta
Resolution:|  Keywords:  save-as 
 Stage:  Accepted  | Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  1   
Needs_better_patch:  1 |  
---+
Changes (by julien):

  * needs_better_patch:  0 => 1
  * stage:  Unreviewed => Accepted
  * milestone:  => 1.3

Comment:

 Yes, I could verify this issue. Here's a simple test case:

 Models:
 {{{
 #!python
 from django.db import models

 class Foo(models.Model):
 name = models.CharField(max_length=30)

 class Bar(models.Model):
 parent = models.ForeignKey(Foo)
 title = models.CharField(max_length=30)
 }}}

 Admin:
 {{{
 #!python
 from django.contrib import admin
 from .models import Foo, Bar

 class BarInline(admin.StackedInline):
 model = Bar

 class FooAdmin(admin.ModelAdmin):
 inlines = (BarInline,)
 save_as = True

 admin.site.register(Foo, FooAdmin)
 }}}

 New inlines added before clicking "Save as new" get lost.

 I really doubt your patch is the way to go , though.

-- 
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] #14938: "Save as" does not save entries added with a TabularInline

2010-12-22 Thread Django
#14938: "Save as" does not save entries added with a TabularInline
---+
  Reporter:  rax   | Owner:  nobody  
Status:  new   | Milestone:  
 Component:  django.contrib.admin  |   Version:  1.2-beta
Resolution:|  Keywords:  save-as 
 Stage:  Unreviewed| Has_patch:  1   
Needs_docs:  0 |   Needs_tests:  1   
Needs_better_patch:  0 |  
---+
Changes (by rax):

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

Comment:

 The "save as" button in the admin change form simply redirects to the
 add_view with the only difference that the "save_as_new" parameter is
 passed to the formset:

 {{{
 formset = FormSet(data=request.POST, files=request.FILES,
  instance=new_object,
  save_as_new=request.POST.has_key("_saveasnew"),
  prefix=prefix, queryset=inline.queryset(request))
 }}}

 Where "FormSet" are instances of "BaseInlineFormSet"

 It's a problem in the BaseInlineFormSet class. See the attached patch.

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