Re: AJAX request does not seem to have request.user

2010-06-02 Thread Carl Nobile
Well that fixed it. I guess I'll be looking at the release notes from now on before I upgrade versions of Django. Thanks Brian for your time. ~Carl On Jun 2, 11:31 am, Brian Neal wrote: > On Jun 2, 10:14 am, Carl Nobile wrote: > > > > > Could the new code not work with a class. I'm still look

Re: AJAX request does not seem to have request.user

2010-06-02 Thread Brian Neal
On Jun 2, 10:14 am, Carl Nobile wrote: > > Could the new code not work with a class. I'm still looking into this > and may discover the answer myself, but if anybody knows or has an > idea I'd be much appreciative. > > ~Carl Carl, those decorators no longer work on class methods without some re-

Re: AJAX request does not seem to have request.user

2010-06-02 Thread Carl Nobile
As it turns out this is not just an AJAX issue. I have looked at the decorators in both Django 1.1 and 1.2.1 and the one in 1.2.1 now looks for the request.user object where the older one did not. I also do something that I think most developers don't do and that is write most of my views in classe

Re: AJAX request does not seem to have request.user

2010-06-02 Thread Bill Freeman
On Wed, Jun 2, 2010 at 9:35 AM, Carl Nobile wrote: > Nothing has changed at all. I was just going through the steps to > migrate my code base to Django 1.2.1 and this stopped working. If I > comment out the decorator everything works just fine minus the > protection of cause. The internal wrapper

Re: AJAX request does not seem to have request.user

2010-06-02 Thread Daniel Roseman
On Jun 2, 2:35 pm, Carl Nobile wrote: > Nothing has changed at all. I was just going through the steps to > migrate my code base to Django 1.2.1 and this stopped working. If I > comment out the decorator everything works just fine minus the > protection of cause. The internal wrapper (closure) in

Re: AJAX request does not seem to have request.user

2010-06-02 Thread Carl Nobile
Nothing has changed at all. I was just going through the steps to migrate my code base to Django 1.2.1 and this stopped working. If I comment out the decorator everything works just fine minus the protection of cause. The internal wrapper (closure) in the decorator is failing when it tries to get '

Re: AJAX request does not seem to have request.user

2010-06-02 Thread Bill Freeman
On the chance that something has changed in your JavaScript as well, are you sure that you're passing the session cookie? This could be a subtle difference, such as a different version of JQuery, or the like. The server side doesn't know from AJAX. They're all just requests that get a response.

AJAX request does not seem to have request.user

2010-06-01 Thread Carl Nobile
I have modified my admin site so that a state/province will be loaded through an AJAX call when the country is chosen. I had @login_required(redirect_field_name='/login/') called just before the view so I could prevent unauthorized AJAX requests. This no longer works after I upgraded from 1.1 to 1.