Re: How to put an asterisk next to the required form fields?

2007-06-25 Thread EL AATIFI Sidi Mohamed
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

Re: How to put an asterisk next to the required form fields?

2007-06-25 Thread EL AATIFI Sidi Mohamed
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

Re: FileInput widget behaviour related to upload_to attribute

2007-06-03 Thread EL AATIFI Sidi Mohamed
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

Re: Alternative approach to UserProfile

2007-05-27 Thread EL AATIFI Sidi Mohamed
> - 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

Re: Alternative approach to UserProfile

2007-05-27 Thread EL AATIFI Sidi Mohamed
> " > 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().%