Re: [PATCH] views: Don't render token section of user profile if REST API disabled

2018-01-04 Thread Stephen Finucane
On Tue, 2017-12-19 at 16:41 +1100, Andrew Donnellan wrote: > In profile.html, if settings.ENABLE_REST_API == False, trying to > render a > link to the generate_token page will raise a NoReverseMatch > exception, so > we shouldn't render that. In any case, if the REST API is disabled, > we > really

Re: [PATCH] views: Don't render token section of user profile if REST API disabled

2018-01-04 Thread Stephen Finucane
On Tue, 2017-12-19 at 16:41 +1100, Andrew Donnellan wrote: > In profile.html, if settings.ENABLE_REST_API == False, trying to > render a > link to the generate_token page will raise a NoReverseMatch > exception, so > we shouldn't render that. In any case, if the REST API is disabled, > we > really

Re: [PATCH] views: Don't render token section of user profile if REST API disabled

2017-12-18 Thread Andrew Donnellan
On 19/12/17 16:41, Andrew Donnellan wrote: In profile.html, if settings.ENABLE_REST_API == False, trying to render a link to the generate_token page will raise a NoReverseMatch exception, so we shouldn't render that. In any case, if the REST API is disabled, we really shouldn't render the API

[PATCH] views: Don't render token section of user profile if REST API disabled

2017-12-18 Thread Andrew Donnellan
In profile.html, if settings.ENABLE_REST_API == False, trying to render a link to the generate_token page will raise a NoReverseMatch exception, so we shouldn't render that. In any case, if the REST API is disabled, we really shouldn't render the API token section of the page at all. Only render