diff options
author | Kabir Kukreti <kabir@gnowledge.org> | 2012-03-21 23:40:16 +0530 |
---|---|---|
committer | Kabir Kukreti <kabir@gnowledge.org> | 2012-03-21 23:40:16 +0530 |
commit | 80c44cea4f454d59c6a981e512d58bf99cadfc2a (patch) | |
tree | 4154fe8732a3abdfa55e2da87eee917d224e09ff /gstudio | |
parent | a65ec2f214c96cb537a101f96998d87a9e681991 (diff) | |
download | gnowsys-80c44cea4f454d59c6a981e512d58bf99cadfc2a.tar.gz |
Bug in views of custom forms fixed.Malformed URL in header fixed
Diffstat (limited to 'gstudio')
-rw-r--r-- | gstudio/templates/gstudio/_header.html | 2 | ||||
-rw-r--r-- | 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 f1f21d1..8b02d2c 100644 --- a/gstudio/templates/gstudio/_header.html +++ b/gstudio/templates/gstudio/_header.html @@ -11,7 +11,7 @@ | <a href="{{ get_absolute_url }}/objects">objects</a> {% if user.is_authenticated %} - | <a href="{{ get_absolute_url }}/gstudio/userdashboard">My Dashboard</a> + | <a href="{{ get_absolute_url }}/nodetypes/userdashboard">My Dashboard</a> {% if user.is_staff %} | <a href="{{ get_absolute_url }}/admin">Admin Dashboard</a> diff --git a/gstudio/views/add.py b/gstudio/views/add.py index f222752..1ed2791 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) |