AnaReis wrote:
> Well none of the previous solutions works... :(
> I tried the "if field.required" and the "if
> field.formfield.is_required" (this particular solution probably
> doesn't work because I'm using the newforms).
> and I put required=True on the required forms... :S
>
Excuse me I mi
AnaReis wrote:
> Hi!
> I have this form where I want to put red asterisks after each required
> field, but I can't find a way to do it...
> This is my template code:
>
> onSubmit="return" >
>
> {%for field in form%}
> {{field.label}}{{field}}{%if something_goes_here
> %}*{%endi
Can you tell us more info about your view code ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group
> - The eval() technique suggested in another reply may work, but isn't
> really a good practice. eval() exists to make interactive prompts
> possible, not as a general programming technique. There is no
> protection on what eval() will do, so if an attacker can modify the
> string that is being
> "
> profile_fields = "email email_backup brother sister".split()
> for key in profile_fields:
> request.user.get_profile().__getattr__(key)
> "
you can try this:
"
profile_fields = "email email_backup brother sister".split()
for key in profile_fields:
eval('request.user.get_profile().%
5 matches
Mail list logo