summaryrefslogtreecommitdiff
path: root/objectapp/views
diff options
context:
space:
mode:
authorcsitifr <csitifr@gmail.com>2012-05-29 16:43:47 +0530
committercsitifr <csitifr@gmail.com>2012-05-29 16:43:47 +0530
commit33a11f8f82f1359c8bb4e6e2d53dee4ff3398bc7 (patch)
tree56468b5f3c2311a141966ba52fcdb4594ea5ed73 /objectapp/views
parent4d22607dafd55abee1b993cf55dad74a1eeb323f (diff)
parentf6f876400e0497e80459d85dad5cac999f97ff9b (diff)
downloadgnowsys-33a11f8f82f1359c8bb4e6e2d53dee4ff3398bc7.tar.gz
Merge remote branch 'gnowgi/master'
Diffstat (limited to 'objectapp/views')
-rw-r--r--objectapp/views/dynamicAT.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/objectapp/views/dynamicAT.py b/objectapp/views/dynamicAT.py
index 43ddab5..50edbbc 100644
--- a/objectapp/views/dynamicAT.py
+++ b/objectapp/views/dynamicAT.py
@@ -11,19 +11,18 @@ from objectapp.forms import *
from gstudio.models import *
from gstudio.admin.forms import *
+#http://127.0.0.1:8000/media/img/puppy.jpeg
def MakeForm(model_cls, *args, **kwargs):
class ContextForm(ModelForm):
class Meta:
model = model_cls.values()[0]
fields = ('value',)
-
-
+ # def __init__(self, *args, **kwargs):
+ # super(ContextForm,self).__init__(*args, **kwargs)
return ContextForm(*args, **kwargs)
-
-
def dynamic_save(request, attit, memtit):
rdict ={}
savedict = {}
@@ -50,6 +49,7 @@ def dynamic_save(request, attit, memtit):
try:
if form.is_valid():
value = form.cleaned_data['value']
+
if Attribute.objects.filter(subject = memtit.id , attributetype = at.id):
att = Attribute.objects.get(subject = memtit.id, attributetype = at.id)