Re: [Django] #1972: OneToOneField and ForeignKey Crashes Admin

2006-05-26 Thread Django
#1972: OneToOneField and ForeignKey Crashes Admin
+---
 Reporter:  [EMAIL PROTECTED]   |Owner:  adrian
 Type:  defect  |   Status:  new   
 Priority:  highest |Milestone:
Component:  Admin interface |  Version:  SVN   
 Severity:  critical|   Resolution:
 Keywords:  models onetoone foreignkey  |  
+---
Comment (by [EMAIL PROTECTED]):

 From discussion on #django on IRC, it appears that every class needs at
 least one explicit member data field. Unfortunately, the fact that List "
 has-many" Item classes doesn't count.
 
 This should probably throw errors in syncdb etc.

-- 
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~--~~~~--~~--~--~---



[Django] #1972: OneToOneField and ForeignKey Crashes Admin

2006-05-23 Thread Django
#1972: OneToOneField and ForeignKey Crashes Admin
---+
 Reporter:  [EMAIL PROTECTED]  |   Owner:  adrian
 Type:  defect |  Status:  new   
 Priority:  highest|   Milestone:
Component:  Admin interface| Version:  SVN   
 Severity:  critical   |Keywords:  models onetoone foreignkey
---+
 With the following model:
 
 
 {{{
 from django.db import models
 
 class List(models.Model):
 # Has many Item objects
 pass
 
 class ListThing(models.Model):
 list = models.OneToOneField(List)
 
 class Admin:
 pass
 
 class Item(models.Model):
 x = models.ForeignKey(X)
 }}}
 
 The admin interface crashes when you try to add a new List to a ListThing
 with the following:
 
 {{{
 Traceback (most recent call last):
 File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
 site-packages/Django-0.91-py2.4.egg/django/core/handlers/base.py" in
 get_response
   74. response = callback(request, *callback_args, **callback_kwargs)
 File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
 site-packages/Django-0.91-
 py2.4.egg/django/contrib/admin/views/decorators.py" in _checklogin
   54. return view_func(request, *args, **kwargs)
 File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
 site-packages/Django-0.91-py2.4.egg/django/views/decorators/cache.py" in
 _wrapped_view_func
   40. response = view_func(request, *args, **kwargs)
 File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
 site-packages/Django-0.91-py2.4.egg/django/contrib/admin/views/main.py" in
 add_stage
   299. return render_change_form(model, manipulator, c, add=True)
 File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
 site-packages/Django-0.91-py2.4.egg/django/contrib/admin/views/main.py" in
 render_change_form
   196. field_sets = opts.admin.get_field_sets(opts)
 
   AttributeError at /admin/picalendar/list/add/
   'NoneType' object has no attribute 'get_field_sets'
 }}}
 
 Always reproducible. Using latest SVN (2967). This might be a dupe of
 ticket 1939, but I'm submitting as a separate ticket just to be sure.

-- 
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~--~~~~--~~--~--~---



Re: [Django] #1972: OneToOneField and ForeignKey Crashes Admin

2006-05-23 Thread Django
#1972: OneToOneField and ForeignKey Crashes Admin
+---
 Reporter:  [EMAIL PROTECTED]   |Owner:  adrian
 Type:  defect  |   Status:  new   
 Priority:  highest |Milestone:
Component:  Admin interface |  Version:  SVN   
 Severity:  critical|   Resolution:
 Keywords:  models onetoone foreignkey  |  
+---
Comment (by [EMAIL PROTECTED]):

 Whoops - typo in simple test case. Corrected:
 
 
 {{{
 from django.db import models
 
 class List(models.Model):
 # Has many Item objects
 pass
 
 class ListThing(models.Model):
 list = models.OneToOneField(List)
 
 class Admin:
 pass
 
 class Item(models.Model):
 parent = models.ForeignKey(List)
 }}}

-- 
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~--~~~~--~~--~--~---