Hi, Let me give you a code sample that would be hopefully a push in the right direction. Simply follow these steps:
1. Create your model. Its the code interface to your data source (database) 2. Create your form. Forms are used for processing input data (validation, error reporting etc) 3. Create your view. You should at least be able to link up a url pattern to a view. If you can't please go through the tutorial 4. Create your template. This is the html returned to the client. Note: Samples for your consideration: #--- in models.py from django.db import models from django import forms CHOICES = (('big', 'big'),('medium', 'medium'), ('small', 'small')) class SimpleColumn(models.Model): my_column = models.CharField(max_length=255, choices=CHOICES) class SimpleColumnForm(forms.ModelForm): class Meta: model = SimpleColumn #-- in views.py from django.shortcuts import render from models import SimpleColumnForm def view_column(request): if request.method == "POST": form = SimpleColumnForm(request.POST) if form.is_valid(): form.save() else: form = SimpleColumnForm() return render(request, 'view_column.html', {'form': form}) <!-- In template view_column.html --> <form method="POST"> {% csrf_token %} {{ form }} <button>Save</button> </form> Please go through the tutorial! https://docs.djangoproject.com/en/1.4//intro/tutorial01/ It is very well written and after 1 hour or so you will have gotten the concepts. Enjoy Django! On Thu, Sep 13, 2012 at 2:58 PM, Tom Evans <tevans...@googlemail.com> wrote: > On Thu, Sep 13, 2012 at 6:26 AM, KVR <kvr....@gmail.com> wrote: > > Hi, > > I am a Django learner . > > I need to do a requirement as described below. > > > > 1.There is a column in a model > > 2.I want to create a template with a select button in that. > > 3.On selecting an option and submitting, the column should be updated > with > > the submitted value. > > > > Please give me some idea on how to do this? > > > > The Django tutorial is a 4 part tutorial guiding you through creating > a model, creating a view that uses that model, and creating forms to > create or edit a model. It is specifically designed to take someone > who has never used django to a point where they can create models, > views and forms to process those models. > > I suggest you attempt to complete the tutorial, and come ask questions > on here iff you get stuck. > > https://docs.djangoproject.com/en/1.4//intro/tutorial01/ > > Cheers > > Tom > > -- > 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, send email to > django-users+unsubscr...@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-users@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.