From 80c44cea4f454d59c6a981e512d58bf99cadfc2a Mon Sep 17 00:00:00 2001 From: Kabir Kukreti Date: Wed, 21 Mar 2012 23:40:16 +0530 Subject: Bug in views of custom forms fixed.Malformed URL in header fixed --- gstudio/templates/gstudio/_header.html | 2 +- gstudio/views/add.py | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gstudio/templates/gstudio/_header.html b/gstudio/templates/gstudio/_header.html index f1f21d17..8b02d2c5 100644 --- a/gstudio/templates/gstudio/_header.html +++ b/gstudio/templates/gstudio/_header.html @@ -11,7 +11,7 @@ | objects {% if user.is_authenticated %} - | My Dashboard + | My Dashboard {% if user.is_staff %} | Admin Dashboard diff --git a/gstudio/views/add.py b/gstudio/views/add.py index f222752d..1ed2791f 100644 --- a/gstudio/views/add.py +++ b/gstudio/views/add.py @@ -20,9 +20,10 @@ from django.http import HttpResponseRedirect from django.template import RequestContext from django.shortcuts import render_to_response from datetime import datetime +from reversion.models import * from gstudio.forms import * - +@reversion.create_revision() def addmetatype(request): if request.method == 'POST': formset = MetatypeForm(request.POST) @@ -42,7 +43,7 @@ def addmetatype(request): return render_to_response(template, variables) - +@reversion.create_revision() def addobjecttype(request): if request.method == 'POST': formset = ObjecttypeForm(request.POST) @@ -60,6 +61,8 @@ def addobjecttype(request): variables = RequestContext(request,{'formset':formset}) return render_to_response(template, variables) + +@reversion.create_revision() def addrelationtype(request): if request.method == 'POST': formset = RelationtypeForm(request.POST) @@ -77,6 +80,7 @@ def addrelationtype(request): return render_to_response(template, variables) +@reversion.create_revision() def addattributetype(request): if request.method == 'POST': formset = AttributetypeForm(request.POST) @@ -93,7 +97,7 @@ def addattributetype(request): variables = RequestContext(request,{'formset':formset}) return render_to_response(template, variables) - +@reversion.create_revision() def addsystemtype(request): if request.method == 'POST': formset = SystemtypeForm(request.POST) @@ -110,6 +114,7 @@ def addsystemtype(request): variables = RequestContext(request,{'formset':formset}) return render_to_response(template, variables) +@reversion.create_revision() def addprocesstype(request): if request.method == 'POST': formset = ProcesstypeForm(request.POST) @@ -126,6 +131,7 @@ def addprocesstype(request): variables = RequestContext(request,{'formset':formset}) return render_to_response(template, variables) +@reversion.create_revision() def addattribute(request): if request.method == 'POST': formset = AttributeForm(request.POST) @@ -142,6 +148,7 @@ def addattribute(request): variables = RequestContext(request,{'formset':formset}) return render_to_response(template, variables) +@reversion.create_revision() def addrelation(request): if request.method == 'POST': formset = RelationForm(request.POST) @@ -158,6 +165,7 @@ def addrelation(request): variables = RequestContext(request,{'formset':formset}) return render_to_response(template, variables) +@reversion.create_revision() def addcomplement(request): if request.method == 'POST': formset = ComplementForm(request.POST) @@ -174,6 +182,7 @@ def addcomplement(request): variables = RequestContext(request,{'formset':formset}) return render_to_response(template, variables) +@reversion.create_revision() def addunion(request): if request.method == 'POST': formset = UnionForm(request.POST) @@ -190,6 +199,7 @@ def addunion(request): variables = RequestContext(request,{'formset':formset}) return render_to_response(template, variables) +@reversion.create_revision() def addintersection(request): if request.method == 'POST': formset = IntersectionForm(request.POST) -- cgit v1.2.3-70-g09d2