~doctormo/erato/trunk

« back to all changes in this revision

Viewing changes to art_website/creations/views.py

  • Committer: Martin Owens
  • Date: 2011-04-01 22:37:40 UTC
  • Revision ID: doctormo@gmail.com-20110401223740-stplnbj9w1qcpf5m
Sync for danny

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    """Create a new Creation with uploads and everything"""
31
31
    rc = RequestContext(request)
32
32
    if request.method == 'POST':
33
 
        form = ContactForm(request.POST)
 
33
        form = CreationForm(request.POST)
34
34
        if form.is_valid():
35
35
            # [[ Process the data in form.cleaned_data ]]
36
36
            # Once we have made the creation object we can assign
37
37
            # All the asset objects to this creation object.
38
38
            return HttpResponseRedirect('art/item/%d/' )#% obj.oid)
39
39
    else:
40
 
        form = ContactForm() # An unbound form
 
40
        form = CreationForm()
41
41
    dc = {
42
42
         'uuid' : 1,
43
43
         'form' : form,
44
44
    }
45
 
    return render_to_response('creation/new.html', dc, context_instance=rc)
 
45
    return render_to_response('creations/new.html', dc, context_instance=rc)
46
46
 
47
47
 
48
48
def index(request):
49
49
    """Return an index of all types"""
50
50
    rc = template.RequestContext(request)
51
 
    return render_to_response('creation/browse.html', {}, context_instance=rc)
 
51
    return render_to_response('creations/browse.html', {}, context_instance=rc)
52
52
 
53
53
 
54
54
def item(request, asset_id):
60
60
        'recent_uploads' : uploads.filter(contentype=type_id)[15:]
61
61
    }
62
62
    rc = template.RequestContext(request)
63
 
    return render_to_response('creation/item.html', c, context_instance=rc)
 
63
    return render_to_response('creations/item.html', c, context_instance=rc)
64
64
 
65
65