1

I have a model class Product in which I am storing generic things related to a product like name, owner, price, image and type. Here the type attribute represents the category of the product and it is used for determining the other factors associated with this product.

Now I have several classes which have attributes related to different categories of a product. So lets say I have a class ShoesInfo which have additional attributes related to shoes like shoe color, show type (sports shoes, running shoes, etc). This class contains a foreign key to above class.

I have to split the details page in two parts. In the first part it will fill all the generic info (the fields in the Product class) and the type. So according to the type he has entered, I have to show the additional fields in the form.

My question is how to do this at runtime. When a user enters a value in type, the additional attribute fields should appear in the django admin form.

Baum mit Augen
  • 49,044
  • 25
  • 144
  • 182
user3265443
  • 535
  • 1
  • 8
  • 25
  • add jquery to django admin. take a look at [this](http://stackoverflow.com/questions/16014719/adding-a-jquery-script-to-the-django-admin-interface). – Hasan Ramezani Sep 07 '14 at 20:26

0 Answers0