Hi group, 

I have another question about Django forms. I designed a Form for a Model, but 
now I want to remove fields depending on some user settings. 
Can I do that?

Lets assume the following: 

class MyModel(models.Model):
    field1 = TextField(null=True, blank=True)
    field2 = Textfield(null=True, blank=True)

class MyModelform(forms.Form):
    field1 = TextField()
    fiels2 = TextField()

def viewform(request):
    # some magic here :)
    return render_to_response(context_instance=RequestContext(request, 
{'form':MyModelForm()}))

Now I want to disable field2 in the form on display, depending on the user 
settings. Any suggestions? 

Greetings & thanks, 
Axel.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to