Q:

Django: Generic detail view IDView must be called with either an object pk or a slug

I'm trying to use detail view based on the values in the parameter. 
URL:
url(r'^mousesmall/(?P<name>.*)/$', IDView.as_view()),

view:
class IDView(DetailView):
    model = RNA
    template_name = "home/details.html"
    def get_context_data(self, **kwargs):
        context = super(IDView, self).get_context_data(**kwargs)
        data = self.kwargs['name']
        context['object'] = RNA.objects.filter(rna_id=data)
        return context

I'm not exactly sure how to call the view with an object pk. 

A:

You need to set slug_field on your class based view so that it know which field you are considering as the slug (which I think in your case is rna_id. You will also need to set slug_url_kwarg in your case as you are using name as your URLConf value
class IDView(DetailView):
    model = RNA
    template_name = "home/details.html"
    slug_field = 'rna_id'
    slug_url_kwarg = 'name'

You won't need to overwrite get_context_object now. You should also give your url a name:
url(r'^mousesmall/(?P<name>.*)/$', IDView.as_view(), name="rna_detailview"),

so it's easier to reverse in your template: 
{% url 'rna_detailview' name=myobject.rna_id %}

