Looking at it objectively I'm on the fence. Angular's $http is easily
configurable at the provider level and I feel like the onus is on any
front-end tool to be flexible enough to work with different servers. At the
same time if I needed the same code to talk to Django, Flask, and Node then
I would expect that I could get all of them on some common ground. Of
course I would probably just roll my own middleware in that case...

I hold that opinion because maintaining a handful of projects, for me, is
easier by having the backend as the constant and just remembering when I'm
rolling djangular that I need to config a couple settings when I start off
with Angular. (Another being setting X-Requested-With so request.is_ajax
works as expected).


On Fri, Nov 22, 2013 at 2:28 PM, Wesley Alvaro <[email protected]> wrote:

> I've been using AngularJS with Django, but I have to override the default
> CSRF cookie/header values in AngularJS since only one of the values (the
> cookie name) can be overridden in Django.
>
> This is a humble request to add a setting for the CSRF header name so that
> I can maintain it as my "AngularJS CSRF settings" and I'm sure others would
> like it too.  Changing the cookie and header to XSRF-TOKEN and X-XSRF-TOKEN
> respectively means that CSRF in Angular just works. Nice. With AngularJS's
> popularity on the sharp incline, I see this being quite a useful-to-many
> feature.
>
> I acknowledge that adding a setting is not ideal, so I welcome any ideas
> you may have.
> Pull request here: https://github.com/django/django/pull/1958
>
> Thanks,
> -Wes
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/65d2ce93-1d70-4972-b635-e65dcb896c61%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAABi-Dqvj%2BDxgu3ys_62jPw%3D6RWjndVZ2dpic0hNqbbDrZZchg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to