which is the best way to implement the
following::
i will be having a text box and a Add button
Along
with a table below it containing headers class
AssesmentBuildingDetails(models.Model):
numbuildingid1 = models.CharField(max_length=14,unique=True)
numbuildingid2 = models.CharField(max_length=7,primary_key=True)
previous_year = models.CharField(max_length=4, blank=True)
previous_year_wardname = models.CharField(max_length=100,blank=True, null=True)
previous_doorno1 = models.CharField(max_length=4,blank=True, null=True)
previous_doorno2 = models.CharField(max_length=10,blank=True, null=True)
current_year = models.CharField(max_length=4, blank=True)
current_year_wardname = models.CharField(max_length=100,blank=True, null=True)
current_doorno1 = models.CharField(max_length=10,blank=True, null=True)
current_doorno2 = models.CharField(max_length=10,blank=True, null=True)
buildingusage = models.CharField(max_length=500,blank=True, null=True)
ownernameaddressmal = models.CharField(max_length=500,blank=True, null=True)
ownernameaddresseng = models.CharField(max_length=500,blank=True, null=True)
plintaarea = models.DecimalField(max_digits=7, decimal_places=2,blank=True, null=True)
class Meta:
db_table = 'assesment_building_details'
my logic is to take the
numbuildingid2 as input from the text box and when i press enter
either on the text field or click the add button it should search
through the database
and add the details to the table without
refreshing the whole page. and the clear the textfield and focus on
it.
It will give proper error msg if the numbuildingid2 is
not found
please help how and which is the best way to
implement this...
thanks