class MyView(DetailView):
    model = MyModel
slug_field = 'slug_field_name'
slug_url_kwarg = 'model_slug'
context_object_name = 'my_model'
url('^(?P<model_slug>[\\w-]+)/$', MyView.as_view(), name='my_named_view')
{{my_model.slug_field_name}}
Django class-based view: How do I pass additional parameters to the as_view method?