I have created a Class view in `views.py` of the django application.

    class HelloTemplate(TemplateView):
        template_name = "index.html"
    
        def get_context_data(self, **kwargs):
            context = super(HelloTemplate, self).get_context_data(**kwargs)
            return context

Now i have a form defined in the html page:

    <form method="get">
        <input type="text" name="q">
        <input type="text" name="q1">
        <input type="submit" value="Search">
    </form>    


As you can see, i am submitting the `form` on the same page.

Now i want to get the form submitted values in my `HelloTemplate` class. 
means i don't want to create another class or methods(outside the existing 
class)

Also, i will like to send error message to the html form if data is not 
validated in the django.


I don't know how to do this, please help me out.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/54b4ed49-3c83-4a38-8dbb-6219912333d9%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to