diff options
author | csitifr <csitifr@gmail.com> | 2012-05-29 16:43:47 +0530 |
---|---|---|
committer | csitifr <csitifr@gmail.com> | 2012-05-29 16:43:47 +0530 |
commit | 33a11f8f82f1359c8bb4e6e2d53dee4ff3398bc7 (patch) | |
tree | 56468b5f3c2311a141966ba52fcdb4594ea5ed73 /objectapp/views | |
parent | 4d22607dafd55abee1b993cf55dad74a1eeb323f (diff) | |
parent | f6f876400e0497e80459d85dad5cac999f97ff9b (diff) | |
download | gnowsys-33a11f8f82f1359c8bb4e6e2d53dee4ff3398bc7.tar.gz |
Merge remote branch 'gnowgi/master'
Diffstat (limited to 'objectapp/views')
-rw-r--r-- | objectapp/views/dynamicAT.py | 8 |
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) |