ValueError when getting objects by id
问题 I'm trying to get data by id in my django app. The problem is that I don't know the kind of id the user will click on. I input the below codes in views. Views def cribdetail(request, meekme_id): post=Meekme.objects.get(id=meekme_id) return render_to_response('postdetail.html',{'post':post, 'Meekme':Meekme},context_instance=RequestContext(request)) Urlconf url(r'^cribme/(?P<meekme_id>)\d+/$', 'meebapp.views.cribdetail', name='cribdetail'), In template: <a href="{% url cribdetail post.id %}">{{