Sunday, March 1, 2015

django Search page

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


--
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+unsubscribe@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/cf179d74-ea55-428f-9dd0-e4ce2297d01b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment