Need to create a user application in python-Django framework where based on input data will insert or update in the database
Question: I am a newbie in python-Django and i have a requirement where i need to create
a template where there will be a text input name (id) and a drop down as
OPS(view,insert,edit) and by giving the id and selecting view as ..it will
check into the db and will show all the project details in the template.

For view:it will display all the records in the table.

For Insert:It will insert the records in the table based on the input
parameters passed in the form.

For update:It will show all the fields and a user can edit and save it which
will update the database from backend.

I wanted to know how to create a model which will link the existing database
with that of this django for the table.So it can update and insert records
through template.

Please help me on this


Answer: check out the official [example
(models)](https://docs.djangoproject.com/en/1.8/intro/tutorial01/#creating-
models)

models in the django orm look like this

    
    
    from django.db import models
    
    class MyModel(models.Model):
        foo = models.IntegerField()  # a field in the model
    

You will need to read the official documentation or check out other django
applications.

