Completed
Push — master ( 0bffe1...d6203d )
by Diederik van der
11s
created

parler.tests.testapp.ArticleSlugView   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %
Metric Value
dl 0
loc 6
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A ArticleSlugView.render_to_response() 0 2 1
1
from django.http import HttpResponse
2
from django.views.generic import DetailView
3
from parler.views import TranslatableSlugMixin
4
from .models import ArticleSlugModel
5
6
7
class ArticleSlugView(TranslatableSlugMixin, DetailView):
8
    model = ArticleSlugModel
9
    slug_field = 'slug'
10
11
    def render_to_response(self, context, **response_kwargs):
12
        return HttpResponse('view: {0}'.format(context['object'].slug))
13