jrief / django-angular

Let AngularJS play well with Django
http://django-angular.awesto.com/
MIT License
1.23k stars 294 forks source link

Rebuilding request in middleware #227

Closed ka7eh closed 8 years ago

ka7eh commented 8 years ago

I'm using django-angular (latest version from github) with django1.9 and ran into a problem with the middleware. When the request is rebuilt in middleware, its path property gets updated, but path_info property stays the same, i.e. /angular/reverse/, which causes Django to throw Http404 error in django.core.handlers.base at resolver_match = resolver.resolve(request.path_info). I remember using django-angular with older versions of django without having any problem, so I'm not sure what's changed. For now I've managed to fix this problem by updating the request (see https://github.com/ka7eh/django-angular/commit/d237becedd82f0067e1b044db29c356bad7315d1), but thought to check and see if anyone has any idea about this issue.

jkosir commented 8 years ago

Um yeah I've done some updates to the request building code lately. I'll use your fix and check if there's anything else to add soon.

jkosir commented 8 years ago

Also added resolved url into path_info and some additional tests.

ka7eh commented 8 years ago

Cool! :)