If you are cleaning the input data (to remove the spaces) then you have this functionality. Why do you need a further description? Sorry if I'm being obtuse.
-Tim On Wed, Feb 24, 2010 at 12:11 PM, jimgardener <jimgarde...@gmail.com> wrote: > > > On Feb 24, 10:51 pm, Timothy Kinney <timothyjkin...@gmail.com> wrote: > > You can define a variable called error_message which is None when you > pass > > it into the template initially. Then you can fill it with the desired > > message and do something like this: > > {% if error_message %} > > # display some information > > > Well,actually,it is not an error..The user 'IS ALLOWED' to enter > ' python' instead of 'python' and the program should proceed to > EDIT the original 'python' object with the new description. > > to illustrate, > > First ,user adds a subject with name='python' and description='my > python lesson' > Now I have 1 subject in db. > > Then user adds another subject name=' python' with > description='lesson by guido' > Note the three space characters at the beginning of the name. > > Now ,this should cause the original record in db to be updated.No new > record is created. > Now db contains 1 subject with name='python' and description='lesson > by guido' > > this is the functionality I am trying to achieve..(I have marked the > else branch in the snippet) > > > any help would be welcome > jim > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.