Dear All,
Django 1.10.6
Django-rest-framework 3.6.2
```
#api/urls.py
def include_version(version):
"""
Returns an include statement containing URL patterns for the passed API
version.
"""
kwargs = {}
if version != settings.API_CURRENT_VERSION:
kwargs['namespace'] = '
ars 2017 17:18:56 UTC+1, Daviddd a écrit :
>>
>> Dear All,
>>
>> Django 1.10.6
>> Django-rest-framework 3.6.2
>>
>>
>> ```
>> #api/urls.py
>> def include_version(version):
>> """
>> Returns an include sta
.urls.exceptions.NoReverseMatch: 'api-docs' is not a registered
namespace
On Thursday, March 16, 2017 at 4:39:48 PM UTC+1, Antoine Nguyen wrote:
>
> Stupid question: have you installed the coreapi package?
>
> Antoine
>
> Le lundi 13 mars 2017 17:18:
^api-docs/', include_docs_urls(title='***')),
]
I suppose it's a bug having the versioning applied.
I will try to open an issue in github.
D
On Thursday, March 16, 2017 at 4:39:48 PM UTC+1, Antoine Nguyen wrote:
>
> Stupid question: have you installed the coreapi packag
This for sure not. From the DRF doc:
http://www.django-rest-framework.org/topics/3.6-announcement/#interactive-api-documentation
> The coreapi library is required as a dependancy for the API docs. Make
sure to install the latest version (2.3.0 or above).
On Wednesday, August 2, 2017 at 8:53:40
Hello All,
I'm using Django 2.0.1 and DRF djangorestframework==3.7.7 with USE_TZ =
True.
The model field is declared as
modified = models.DateTimeField(auto_now=True)
Serializer
**
class Meta:
fields = ('id', 'url', 'owners', 'type', 'title', 'abstract',
'created', 'keywords', 'use
Dear all,
Using APIClient (not the requests based class) is it possible to pass as
param the accept_language?
class BaseAPITestCase(APITestCase):
@classmethod
def setUpTestData(cls):
def _get_jwt_token(user_credentials):
url_token_auth = reverse('api:default:api-toke
pr 2018, at 07:41, Daviddd >
> wrote:
>
> ACCEPT_LANGUAGE='es'
>
>
> I think you’d need to pass it like this:
>
> HTTP_ACCEPT_LANGUAGE=‘es'
>
>
> Kind Regards,
>
> Carlton
>
--
You received this message because you are subscribed
I do something similar:
class CacheKeyDispatchMixin:
def dispatch(self, *args, **kwargs):
if self.request.method == 'GET' or self.request.method == 'HEAD':
url_to_cache = '/{0}{1}'.format(get_language(),
self.request.get_full_path())
cache_hash = calculate_xxxh