Example #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));
Example #2
0
def new_sketch(request):
    s = Sketch(code="", parent=0, locked=0)
    r = s.save()
    return HttpResponseRedirect("/sketch/"+str(s.pk));