I am using django 1.0 and I have created my models using the example in the Django book. I am able to perform the basic function of adding data; now I need a way of retrieving that data, loading it into a form (change_form?! or something), EDIT it and save it back to the DB. Secondly how do I DELETE the data that's in the DB? i.e. search, select and then delete!
Please show me an example of the code I need to write on my view.py
and urls.py
for perform this task.
Say you have a model Employee. To edit an entry with primary key emp_id you do:
to delete it just do:
so a full view would be:
In urls.py you'd need two entries like this:
I suggest you take a look at the docs
Read the following: The Django admin site. Then revise your question with specific details.