#11143: AttributeError: 'str' object has no attribute '_default_manager'
---------------------------+------------------------------------------------
 Reporter:  camilonova     |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Uncategorized  |     Version:  1.0       
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 Hi, since months ago i've getting sometimes this error:


 {{{
 Traceback (most recent call last):

  File
 "/home/axiacore/webapps/atlantis/lib/python2.5/django/core/handlers/base.py",
 line 83, in get_response
    request.path_info)

  File
 "/home/axiacore/webapps/atlantis/lib/python2.5/django/core/urlresolvers.py",
 line 186, in resolve
    sub_match = pattern.resolve(new_path)

  File
 "/home/axiacore/webapps/atlantis/lib/python2.5/django/core/urlresolvers.py",
 line 184, in resolve
    for pattern in self.url_patterns:

  File
 "/home/axiacore/webapps/atlantis/lib/python2.5/django/core/urlresolvers.py",
 line 208, in _get_url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns",
 self.urlconf_module)

  File
 "/home/axiacore/webapps/atlantis/lib/python2.5/django/core/urlresolvers.py",
 line 203, in _get_urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)

  File
 "/home/axiacore/webapps/atlantis/lib/python2.5/django/utils/importlib.py",
 line 35, in import_module
    __import__(name)

  File
 "/home/axiacore/webapps/atlantis/atlantis/local_apps/facturacion/urls.py",
 line 16, in <module>
    from atlantis.local_apps.facturacion.forms import PagoFacturaForm

  File
 "/home/axiacore/webapps/atlantis/atlantis/local_apps/facturacion/forms.py",
 line 5, in <module>
    class FacturaForm(forms.ModelForm):

  File
 "/home/axiacore/webapps/atlantis/lib/python2.5/django/forms/models.py",
 line 201, in __new__
    opts.exclude, formfield_callback)

  File
 "/home/axiacore/webapps/atlantis/lib/python2.5/django/forms/models.py",
 line 165, in fields_for_model
    formfield = formfield_callback(f)

  File
 "/home/axiacore/webapps/atlantis/lib/python2.5/django/forms/models.py",
 line 183, in <lambda>
    lambda f: f.formfield())

  File
 
"/home/axiacore/webapps/atlantis/lib/python2.5/django/db/models/fields/related.py",
 line 727, in formfield
    'queryset': self.rel.to._default_manager.complex_filter(

 AttributeError: 'str' object has no attribute '_default_manager'

 }}}

 I get this only when i have DEBUG=False, when i have DEBUG=True it never
 happens. Also, it no only happen to that model, appears in any model, i
 get a feeling in how to reproduce it:
  1. Put your app in apache wsgi (i have it in webfaction)
  1. Try to enter a url who points to a view that have @login_required
 (Here the normal behavior is to redirect the user to login page, but
 sometimes, does not redirect, instead email me the error message*)
  1. When redirected to login page, you login, and then works as normally

 Maybe its something when validating if the user is logged in for first
 time, but i dont have any idea, this is like the 20 error message that i
 get, so i consider it important.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/11143>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to