#8569: Admin fieldsets can cause "'str' object has no attribute
'_default_manager'' under mod_wsgi
------------------------------------+---------------------------------------
Reporter: kmtracey | Owner: mtredinnick
Status: reopened | Milestone: 1.0
Component: Uncategorized | Version: SVN
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
------------------------------------+---------------------------------------
Changes (by BEBABUM):
* status: closed => reopened
* resolution: fixed =>
Comment:
Hi there,
I have the following code:
{{{
"""
app firstApp
models.py
"""
class Model1(models.Model):
name = models.CharField(max_length = 100)
}}}
{{{
"""
app SecondApp
models.py
"""
class Model2(models.Model):
model1 = models.ForeignKey("firstApp.Model1", null = True, blank =
True)
date_time = models.DateTimeField()
#Forms
class Model2AdminForm(forms.ModelForm)
class Meta:
model = Model2
}}}
It crashes when I do something like a = MOdel2AdminForm()
for some reason "from project.firsApp.models import Model1" does not work,
just throw an error saying that the model "Model1" can't be imported
When form is like above example throw an error saying "'str' object has no
attribute '_default_manager'"
When form is like Model2AdminForm(forms.Form) all seems to work fine but
the form is not what I want.
Regards,
GPB - BEBABUM
--
Ticket URL: <http://code.djangoproject.com/ticket/8569#comment:7>
Django <http://code.djangoproject.com/>
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.