Re: [Django] #12235: MultiValueDictKeyError when editing Inline objects

2013-02-25 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
 Reporter:  bruce@…|Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  contrib.admin  |  Version:  1.2
 Severity:  Normal |   Resolution:  fixed
 Keywords: | Triage Stage:  Accepted
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+
Changes (by nickname123):

 * cc: wgordonw1@… (added)
 * ui_ux:   => 0
 * type:   => Uncategorized
 * severity:   => Normal
 * easy:   => 0


Comment:

 per discussion on #django-dev I have opened a new ticket:
 https://code.djangoproject.com/ticket/19888

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-11-25 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
  Reporter:  br...@playfirst.com   | Owner:  nobody
Status:  closed| Milestone:
 Component:  django.contrib.admin  |   Version:  1.2   
Resolution:  fixed |  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by quinode):

  * status:  reopened => closed
  * resolution:  => fixed

Comment:

 @ bruce_s :[[BR]]
 Another way to tell if the UUID field being added to the model is a
 primary key :
 {{{
 def contribute_to_class(self, cls, name):
 if self.primary_key == True:
 assert not cls._meta.has_auto_field, "A model can't have more
 than one AutoField: %s %s %s; have %s" %
 (self,cls,name,cls._meta.auto_field)
 super(UUIDField, self).contribute_to_class(cls, name)
 cls._meta.has_auto_field = True
 cls._meta.auto_field = self
 else:
 super(UUIDField, self).contribute_to_class(cls, name)
 }}}

 @atkinsonr :[[BR]]
 I also use an UUIDField() in an abstract model, it's not a problem, you
 should really check your field implementation or use the django_extensions
 one.

 Re-setting this issue to "fixed"

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-11-24 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
  Reporter:  br...@playfirst.com   | Owner:  nobody
Status:  reopened  | Milestone:
 Component:  django.contrib.admin  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by quinode):

 @ramiro :
 Ok, the matiasb fix (bruce_s version for me) finally works with the
 django_extension UUIDField() implementation too.
 I was getting errors because of another hack on a particular model.
 I'm currently asking for the fix to be added to the django_extension uuid
 field.

 @atkinsonr:
 Rather than defining yourself your UUIDfield in your abstract model, you
 could try to use django_extensions with the fix

 Now, I'm not sure is this can be called "invalid" or "fixed"
 If I understand what the fix does, it sets *again* the _meta.auto_field
 and _meta.has_auto_field that should have been set by django itself
 Is this happening because Django skip this process when a CharField is
 given as pk ?
 (Or is it that ALL the people writing UUIDFields are all wrong ?)

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-11-23 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
  Reporter:  br...@playfirst.com   | Owner:  nobody
Status:  reopened  | Milestone:
 Component:  django.contrib.admin  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by quinode):

 You're completely true.
 However, I'm not there right now : I use django and Python since a month
 now, and when I peek in those files, I can just measure the learning gap
 ...
 I tried to adapt the patch but it resulted in errors really too weird for
 me, I'll try again, period

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-11-23 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
  Reporter:  br...@playfirst.com   | Owner:  nobody
Status:  reopened  | Milestone:
 Component:  django.contrib.admin  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by ramiro):

 @atkinsonr, @quinode:

 You don't tell us if he UUID field implementation you use implements the
 fix ''matiasb'' comment details (or a similar more general one). If not
 please implement it, if it's a filed part of another project test and
 contribute such a fix to it (or point the author to this ticket), you re
 the ones using (or in need to use it) it and you are the ones in the
 better position to get it working with real code. Saying ''It doesn't work
 for me either'' but not making clear you've read just the ticket
 description or all the discussion isn't of too much help.

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-11-23 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
  Reporter:  br...@playfirst.com   | Owner:  nobody
Status:  reopened  | Milestone:
 Component:  django.contrib.admin  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by quinode):

 You can reproduce the bug using django_extensions UUIDField()
 implementation using this setup :

 using : django 1.2.3 , django-extensions 0.5, PGSQL db with psycopg2

 in settings.py
 {{{
 INSTALLED_APPS = (
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.admin',
 'django_extensions',
 'myapp',
 )
 }}}

  in myapp/models.py

 {{{
 from django.db import models
 from django_extensions.db import fields as exfields

 class Worker(models.Model):
 id = exfields.UUIDField(primary_key=True)
 name = models.CharField(blank=True, max_length=100)
 def __unicode__(self):
 return(self.name)

 class Task(models.Model):
 id = exfields.UUIDField(primary_key=True)
 description = models.CharField(blank=True, max_length=100)
 workers = models.ManyToManyField(Worker, through="Todo")
 def __unicode__(self):
 return(self.description)

 class Todo(models.Model):
 id = exfields.UUIDField(primary_key=True)
 worker = models.ForeignKey(Worker)
 task = models.ForeignKey(Task)
 }}}

 in myapp/admin.py

 {{{
 from django.contrib import admin
 from myapp.models import *

 class WorkerAdmin(admin.ModelAdmin):
 pass

 class TodoInline(admin.TabularInline):
 model = Todo
 fk_name = 'task'
 raw_id_fields = ('worker',)
 extra = 1

 class TaskAdmin(admin.ModelAdmin):
 inlines = (TodoInline,)

 admin.site.register(Worker,WorkerAdmin)
 admin.site.register(Task,TaskAdmin)
 }}}

 Once db synced and admin urls setup, foillow these steps to reproduce the
 bug :[[BR]]
 1. Log into admin, add some workers[[BR]]
 2. Go to Task admin, add a task, add a related worker to it, save[[BR]]
 3. Go back to this same task admin page, and just try to save again, or
 add a worker and save, you got :[[BR]]

 MultiValueDictKeyError at /admin/myapp/task/c64af3b5-f6e4-11df-869c-
 001cb3bc281a/[[BR]]

 "Key 'todo_set-0-id' not found in "


 https://gist.github.com/711535

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-11-21 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
  Reporter:  br...@playfirst.com   | Owner:  nobody
Status:  reopened  | Milestone:
 Component:  django.contrib.admin  |   Version:  1.2   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by quinode):

  * version:  1.1 => 1.2

Comment:

 Having the very same problem using the django-extensions UUIDField()

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-10-18 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
  Reporter:  br...@playfirst.com   | Owner:  nobody
Status:  reopened  | Milestone:
 Component:  django.contrib.admin  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

  * milestone:  1.2 =>

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-09-16 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
  Reporter:  br...@playfirst.com   | Owner:  nobody
Status:  reopened  | Milestone:  1.2   
 Component:  django.contrib.admin  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by atkinsonr):

  * status:  closed => reopened
  * resolution:  invalid =>

Comment:

 I get the same error message; steps to replicate are the same as the OP,
 but I am generating my UUID primary key as a CharField from an abstract
 base class like this:

 {{{
 class UUIDModel(models.Model):
 """
 Inherit from this abstract base to use UUID as a primary key in
 models
 """
 id = models.CharField(max_length=36, primary_key=True, blank=True,
 editable=False)

 def save(self, *args, **kwargs):
 if not self.id:
 self.id = str(uuid.uuid1())
 super(UUIDModel, self).save()

 class Meta:
 abstract = True
 }}}

 Therefore I don't think that this issue is invalid.

 Stack trace attached: http://dpaste.org/fj0h/

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-03-04 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
  Reporter:  br...@playfirst.com   | Owner:  nobody
Status:  closed| Milestone:  1.2   
 Component:  django.contrib.admin  |   Version:  1.1   
Resolution:  invalid   |  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by jacob):

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

Comment:

 It's clear to me from the description that this is an improperly written
 uuid field class. As suggested, the fix goes 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-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] #12235: MultiValueDictKeyError when editing Inline objects

2010-02-26 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
  Reporter:  br...@playfirst.com   | Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  django.contrib.admin  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by John_Blaze):

 Nice thought - I created was creating a UUIDForeignKey.

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-02-26 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
  Reporter:  br...@playfirst.com   | Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  django.contrib.admin  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by bruce_s):

 For our models, we always use "id" as the primary key, so a slight
 modification of the above suggestion works for us:
 {{{
 def contribute_to_class(self, cls, name):
 if name == "id":
 assert not cls._meta.has_auto_field, "A model can't have more
 than one AutoField: %s %s %s; have %s" %
 (self,cls,name,cls._meta.auto_field)
 super(UUIDField, self).contribute_to_class(cls, name)
 cls._meta.has_auto_field = True
 cls._meta.auto_field = self
 else:
 super(UUIDField, self).contribute_to_class(cls, name)

 }}}

 Is there a better way to determine if a given field is the primary key?

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-02-26 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
  Reporter:  br...@playfirst.com   | Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  django.contrib.admin  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by John_Blaze):

 Hrm - what happens if you have 2 UUIDField(s) in your model?

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-02-24 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
  Reporter:  br...@playfirst.com   | Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  django.contrib.admin  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by matiasb):

 I think the problem could be in the definition of the UUIDField in the
 attached file. There, the id (an AutoField) is being replaced with an
 UUIDField, thus this field should work as an auto field. Then, adding the
 following to the UUIDField class definition solves the issue:

 {{{
 def contribute_to_class(self, cls, name):
 assert not cls._meta.has_auto_field, "A model can't have more than
 one AutoField."
 super(UUIDField, self).contribute_to_class(cls, name)
 cls._meta.has_auto_field = True
 cls._meta.auto_field = self
 }}}

 What was the problem? When generating the template for inline forms, as
 the Author instances didn't have an auto_field, there wasn't any hidden
 field to relate the shown Author instance with the previously saved Author
 when editing a Book (in stacked.html and tabular.html templates):
 {{{
 {% if inline_admin_form.has_auto_field %}{{
 inline_admin_form.pk_field.field }}{% endif %}
 }}}

 However, the saving view expects the 'author_set-0-id' field with the uuid
 (primary key) of the author to be updated. I'm assuming the if tag in the
 template is needed to be there, as defined.

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-02-24 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
  Reporter:  br...@playfirst.com   | Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  django.contrib.admin  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by j.sta...@gmail.com):

 Yes, I'm getting the same error - but don't even know were to start
 looking for the solution?

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-02-10 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
---+
  Reporter:  br...@playfirst.com   | Owner:  nobody
Status:  new   | Milestone:  1.2   
 Component:  django.contrib.admin  |   Version:  1.1   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by russellm):

  * component:  Uncategorized => django.contrib.admin

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-02-05 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
--+-
  Reporter:  br...@playfirst.com  | Owner:  nobody
Status:  new  | Milestone:  1.2   
 Component:  Uncategorized|   Version:  1.1   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by jace...@gmail.com):

 Getting the same error on one-to-many relationships with an existing
 Oracle schema (i.e. all entities are managed = False and generated via
 inspectdb). Stopped our Django implementation in its tracks :-(

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2010-02-05 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
--+-
  Reporter:  br...@playfirst.com  | Owner:  nobody
Status:  new  | Milestone:  1.2   
 Component:  Uncategorized|   Version:  1.1   
Resolution:   |  Keywords:
 Stage:  Accepted | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by russellm):

  * stage:  Unreviewed => Accepted
  * milestone:  => 1.2

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2009-12-15 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
--+-
  Reporter:  br...@playfirst.com  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Uncategorized|   Version:  1.1   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by bruce_s):

 What do you mean by use preview?

 Here is the cut-and-paste output from django:


 {{{

 Environment:

 Request Method: POST
 Request URL: http://localhost/admin/gamedata/gamedata/book/8016d938-e9e2
 -11de-8ec3-00188b8e3ea8/
 Django Version: 1.2 pre-alpha
 Python Version: 2.6.4
 Installed Applications:
 ['django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.sites',
  'django.contrib.admin',
  'admin.django_evolution',
  'admin.gamedata']
 Installed Middleware:
 ('django.middleware.common.CommonMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  'django.contrib.auth.middleware.AuthenticationMiddleware')


 Traceback:
 File "/usr/lib64/python2.6/site-packages/django/core/handlers/base.py" in
 get_response
   92. response = callback(request, *callback_args,
 **callback_kwargs)
 File "/usr/lib64/python2.6/site-packages/django/contrib/admin/options.py"
 in wrapper
   226. return self.admin_site.admin_view(view)(*args,
 **kwargs)
 File "/usr/lib64/python2.6/site-packages/django/utils/decorators.py" in
 __call__
   23. return self.decorator(self.func)(*args, **kwargs)
 File "/usr/lib64/python2.6/site-packages/django/views/decorators/cache.py"
 in _wrapped_view_func
   70. response = view_func(request, *args, **kwargs)
 File "/usr/lib64/python2.6/site-packages/django/contrib/admin/sites.py" in
 inner
   186. return view(request, *args, **kwargs)
 File "/usr/lib64/python2.6/site-packages/django/db/transaction.py" in
 _commit_on_success
   240. res = func(*args, **kw)
 File "/usr/lib64/python2.6/site-packages/django/contrib/admin/options.py"
 in change_view
   826.   instance=new_object,
 prefix=prefix)
 File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in
 __init__
   724. queryset=qs)
 File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in
 __init__
   459. super(BaseModelFormSet, self).__init__(**defaults)
 File "/usr/lib64/python2.6/site-packages/django/forms/formsets.py" in
 __init__
   44. self._construct_forms()
 File "/usr/lib64/python2.6/site-packages/django/forms/formsets.py" in
 _construct_forms
   88. self.forms.append(self._construct_form(i))
 File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in
 _construct_form
   737. form = super(BaseInlineFormSet, self)._construct_form(i,
 **kwargs)
 File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in
 _construct_form
   475. pk = self.data[pk_key]
 File "/usr/lib64/python2.6/site-packages/django/utils/datastructures.py"
 in __getitem__
   203. raise MultiValueDictKeyError, "Key %r not found in %r"
 % (key, self)

 Exception Type: MultiValueDictKeyError at
 /gamedata/gamedata/book/8016d938-e9e2-11de-8ec3-00188b8e3ea8/
 Exception Value: Key 'author_set-0-id' not found in 

 }}}

-- 
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] #12235: MultiValueDictKeyError when editing Inline objects

2009-11-17 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
--+-
  Reporter:  br...@playfirst.com  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Uncategorized|   Version:  1.1   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Old description:

> the attached simple model (Book and Author), using a custom UUID type as
> described here: http://www.gordontillman.info/computers/41-django/94
> -django-uuidfield-problem
>
> If you add a book with an author, and then try to edit the authors (add a
> second one, edit the name, etc), you will generate this error:
>
> MultiValueDictKeyError at /admin/gamedata/book/7432e312-d39b-11de-913b-
> 00188b8e3ea8/
>
> Key 'author_set-0-id' not found in  'author_set-TOTAL_FORMS': [u'5'], u'author_set-0-book': [u'7432e312-d39b-
> 11de-913b-00188b8e3ea8'], u'title': [u'book1'], u'author_set-0-name':
> [u'author1'], u'author_set-3-name': [u''], u'author_set-2-book':
> [u'7432e312-d39b-11de-913b-00188b8e3ea8'], u'author_set-INITIAL_FORMS':
> [u'2'], u'author_set-4-name': [u''], u'author_set-2-name':
> [u'asdasdasd'], u'author_set-3-book': [u'7432e312-d39b-11de-913b-
> 00188b8e3ea8'], u'author_set-1-book': [u'7432e312-d39b-11de-913b-
> 00188b8e3ea8'], u'author_set-4-book': [u'7432e312-d39b-11de-913b-
> 00188b8e3ea8'], u'author_set-1-name': [u'authro2']}>
>
> Traceback:
> File "/usr/lib64/python2.6/site-packages/django/core/handlers/base.py" in
> get_response
>   92. response = callback(request, *callback_args,
> **callback_kwargs)
> File "/usr/lib64/python2.6/site-packages/django/contrib/admin/options.py"
> in wrapper
>   226. return self.admin_site.admin_view(view)(*args,
> **kwargs)
> File "/usr/lib64/python2.6/site-packages/django/utils/decorators.py" in
> __call__
>   23. return self.decorator(self.func)(*args, **kwargs)
> File "/usr/lib64/python2.6/site-
> packages/django/views/decorators/cache.py" in _wrapped_view_func
>   70. response = view_func(request, *args, **kwargs)
> File "/usr/lib64/python2.6/site-packages/django/contrib/admin/sites.py"
> in inner
>   186. return view(request, *args, **kwargs)
> File "/usr/lib64/python2.6/site-packages/django/db/transaction.py" in
> _commit_on_success
>   240. res = func(*args, **kw)
> File "/usr/lib64/python2.6/site-packages/django/contrib/admin/options.py"
> in change_view
>   826.   instance=new_object,
> prefix=prefix)
> File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in
> __init__
>   724. queryset=qs)
> File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in
> __init__
>   459. super(BaseModelFormSet, self).__init__(**defaults)
> File "/usr/lib64/python2.6/site-packages/django/forms/formsets.py" in
> __init__
>   44. self._construct_forms()
> File "/usr/lib64/python2.6/site-packages/django/forms/formsets.py" in
> _construct_forms
>   88. self.forms.append(self._construct_form(i))
> File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in
> _construct_form
>   737. form = super(BaseInlineFormSet, self)._construct_form(i,
> **kwargs)
> File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in
> _construct_form
>   475. pk = self.data[pk_key]
> File "/usr/lib64/python2.6/site-packages/django/utils/datastructures.py"
> in __getitem__
>   203. raise MultiValueDictKeyError, "Key %r not found in %r"
> % (key, self)

New description:

 the attached simple model (Book and Author), using a custom UUID type as
 described here: http://www.gordontillman.info/computers/41-django/94
 -django-uuidfield-problem

 If you add a book with an author, and then try to edit the authors (add a
 second one, edit the name, etc), you will generate this error:
 {{{
 MultiValueDictKeyError at /admin/gamedata/book/7432e312-d39b-11de-913b-
 00188b8e3ea8/

 Key 'author_set-0-id' not found in 

 Traceback:
 File "/usr/lib64/python2.6/site-packages/django/core/handlers/base.py" in
 get_response
   92. response = callback(request, *callback_args,
 **callback_kwargs)
 File "/usr/lib64/python2.6/site-packages/django/contrib/admin/options.py"
 in wrapper
   226. return self.admin_site.admin_view(view)(*args,
 **kwargs)
 File "/usr/lib64/python2.6/site-packages/django/utils/decorators.py" in
 __call__
   23. return self.decorator(self.func)(*args, **kwargs)
 File "/usr/lib64/python2.6/site-packages/django/views/decorators/cache.py"
 in 

Re: [Django] #12235: MultiValueDictKeyError when editing Inline objects

2009-11-17 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
--+-
  Reporter:  br...@playfirst.com  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Uncategorized|   Version:  1.1   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by br...@playfirst.com):

 Full error message:

 MultiValueDictKeyError at /admin/gamedata/book/7432e312-d39b-11de-913b-
 00188b8e3ea8/

 Key 'author_set-0-id' not found in 

 Request Method: POST
 Request URL:http://127.0.0.1:8000/admin/gamedata/book/7432e312-d39b-
 11de-913b-00188b8e3ea8/
 Exception Type: MultiValueDictKeyError
 Exception Value:

 Key 'author_set-0-id' not found in 

 Exception Location: /usr/lib64/python2.6/site-
 packages/django/utils/datastructures.py in __getitem__, line 203
 Python Executable:  /usr/bin/python2.6
 Python Version: 2.6.2
 Python Path:['/usr/local/home/bruce/game/trunk/admin',
 '/usr/lib64/python26.zip', '/usr/lib64/python2.6', '/usr/lib64/python2.6
 /plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-
 old', '/usr/lib64/python2.6/lib-dynload', '/usr/lib64/python2.6/site-
 packages', '/usr/lib64/python2.6/site-packages/Numeric',
 '/usr/lib64/python2.6/site-packages/PIL', '/usr/lib64/python2.6/site-
 packages/gst-0.10', '/usr/lib64/python2.6/site-packages/gtk-2.0',
 '/usr/lib64/portage/pym']
 Server time:Tue, 17 Nov 2009 11:19:20 -0600



 Environment:

 Request Method: POST
 Request URL: http://127.0.0.1:8000/admin/gamedata/book/7432e312-d39b-11de-
 913b-00188b8e3ea8/
 Django Version: 1.2 pre-alpha
 Python Version: 2.6.2
 Installed Applications:
 ['django.contrib.auth',
  'django.contrib.contenttypes',
  'django.contrib.sessions',
  'django.contrib.sites',
  'django.contrib.admin',
  'admin.gamedata',
  'admin.django_evolution']
 Installed Middleware:
 ('django.middleware.common.CommonMiddleware',
  'django.contrib.sessions.middleware.SessionMiddleware',
  'django.contrib.auth.middleware.AuthenticationMiddleware')


 Traceback:
 File "/usr/lib64/python2.6/site-packages/django/core/handlers/base.py" in
 get_response
   92. response = callback(request, *callback_args,
 **callback_kwargs)
 File "/usr/lib64/python2.6/site-packages/django/contrib/admin/options.py"
 in wrapper
   226. return self.admin_site.admin_view(view)(*args,
 **kwargs)
 File "/usr/lib64/python2.6/site-packages/django/utils/decorators.py" in
 __call__
   23. return self.decorator(self.func)(*args, **kwargs)
 File "/usr/lib64/python2.6/site-packages/django/views/decorators/cache.py"
 in _wrapped_view_func
   70. response = view_func(request, *args, **kwargs)
 File "/usr/lib64/python2.6/site-packages/django/contrib/admin/sites.py" in
 inner
   186. return view(request, *args, **kwargs)
 File "/usr/lib64/python2.6/site-packages/django/db/transaction.py" in
 _commit_on_success
   240. res = func(*args, **kw)
 File "/usr/lib64/python2.6/site-packages/django/contrib/admin/options.py"
 in change_view
   826.   instance=new_object,
 prefix=prefix)
 File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in
 __init__
   724. queryset=qs)
 File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in
 __init__
   459. super(BaseModelFormSet, self).__init__(**defaults)
 File "/usr/lib64/python2.6/site-packages/django/forms/formsets.py" in
 __init__
   44. self._construct_forms()
 File "/usr/lib64/python2.6/site-packages/django/forms/formsets.py" in
 _construct_forms
   88. self.forms.append(self._construct_form(i))
 File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in
 _construct_form
   737. form = super(BaseInlineFormSet, self)._construct_form(i,
 **kwargs)
 File "/usr/lib64/python2.6/site-packages/django/forms/models.py" in
 _construct_form
   475. pk = self.data[pk_key]
 File "/usr/lib64/python2.6/site-packages/django/utils/datastructures.py"
 in __getitem__
   203. raise MultiValueDictKeyError, "Key %r not found in %r"
 % (key, self)

 Exception Type: MultiValueDictKeyError at /admin/gamedata/book/7432e312
 -d39b-11de-913b-00188b8e3ea8/
 Exception Value: Key 'author_set-0-id' not found in 

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

--

You received this message because you are subscribed to the Google Groups 
"Django updates" 

Re: [Django] #12235: MultiValueDictKeyError when editing Inline objects

2009-11-17 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
--+-
  Reporter:  br...@playfirst.com  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Uncategorized|   Version:  1.1   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Comment (by br...@playfirst.com):

 this is related to #8813

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=.




Re: [Django] #12235: MultiValueDictKeyError when editing Inline objects

2009-11-17 Thread Django
#12235: MultiValueDictKeyError when editing Inline objects
--+-
  Reporter:  br...@playfirst.com  | Owner:  nobody
Status:  new  | Milestone:
 Component:  Uncategorized|   Version:  1.1   
Resolution:   |  Keywords:
 Stage:  Unreviewed   | Has_patch:  0 
Needs_docs:  0|   Needs_tests:  0 
Needs_better_patch:  0|  
--+-
Changes (by br...@playfirst.com):

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

Comment:

 Note: this error occurs whether you specify auto_created=True or
 auto_created=False, for Book, Author, and UUIDField (I have tried all 8
 combinations of auto_created on and off for all three types).

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=.