Exemple #1
0
Fichier : views.py Projet : fay/wt
def clone(request, id):
    try:
        object = dao.get(id)
    except :
        raise Http404
    key = dao.save_clone(object, request.user)
    request.user.message_set.create(message='\"' + object.what + '\" 已经添加到您的名下!'.decode('utf-8'))
    return HttpResponseRedirect('/wantown/view/id/' + id)
Exemple #2
0
Fichier : views.py Projet : fay/wt
def view(request, id):
    try:
        object = dao.get(id)
    except :
        raise Http404
    return render_to_response('view.html', {'object':object}, context_instance=RequestContext(request))