예제 #1
0
def fork_sketch(request,pk):
    sketch = Sketch.objects.get(pk=pk)
    s = Sketch(code=sketch.code, parent=pk, locked=0)
    r = s.save()
    return HttpResponseRedirect("/sketch/"+str(s.pk));
예제 #2
0
def new_sketch(request):
    s = Sketch(code="", parent=0, locked=0)
    r = s.save()
    return HttpResponseRedirect("/sketch/"+str(s.pk));