jakeharding / django-jasmine

Package to integrate Jasmine with Django
Other
78 stars 27 forks source link

Add csrf_token to base.html #21

Closed DanielSwain closed 7 years ago

DanielSwain commented 7 years ago

Easy enough for us to do, but also easy for you to do to in order to establish this as a default situation. I know that Django's testing framework disables the csrf checking, so would this be legitimate in a testing environment?

jakeharding commented 7 years ago

The csrf_token is designed to be part of a form and submitted as part of a post request so I don't see how it would fit into the base.html. Could you provide an example of how you are using it?

DanielSwain commented 7 years ago

I was just thinking that if the tests are testing POSTs to endpoints, then a CSRF token would be necessary. I'm still learning about testing in Django, so maybe using Jasmine in this way isn't the best way to test endpoints. Please close this if there is nothing more to be said here.

jakeharding commented 7 years ago

Closing this for now.