Hi Team,
I have created 4 models ( class Company, class Department, class Section, class Employee )
Company Model has : CMP1, CMP2, CMP3, CMP4, CMP5(Year is the foreign key in this model)
Department Model has : DEP1, DEP2,DEP3,DEP4,DEP5 (Company is the foreign key in this model)
Section Model has : SEC1, SEC2,SEC3,SEC4,SEC5 (Department is the foreign key in this model)
Employee Model has : EMP1,EMP2,EMP3,EMP4,EMP5 (Section is the foreign key in this model)
Now I have created 2 more models (class Details, Class Map)
Details Model Fields:
salary
Map Model Fields :
Company ( foreign key Company Model)
Department (foreign key Department Model )
Section (foreign key section Model)
Employee (foreign key employee Model)
Details Model will Map salary for the employees
I need to show these two models in admin page ( class Map as the inline model for class Details)
=================================================================================
ADMIN PAGE looks as below :
Details
select salary range
(drop down)
MAP [ inline Model ] : Need to Map employees who come under the salary range
(drop down)
(drop down) (drop
down) (drop down)
2. select Company select Department select Section select Employee
(drop down) (drop down) (drop down) (drop down)
3. select Company select Department select Section select Employee
(drop down) (drop down) (drop down) (drop down)
======================================================================================
=> On selecting a company, we should display only departments in that company.
=> On selecting Department,
we should display only sections in that Department.
=> On selecting Section, we should display only employees in that Section.
I am messed with this implementation, Please help me out in this. If possible please brief me the steps to follow on this implementation
Thanks in Advance
Regards,
Teja Y
LAMP
This e-mail message and any attachments are for the sole use of the intended recipient(s) and may contain proprietary, confidential, trade secret or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited and may be a violation of law. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
--
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...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/SG2PR02MB3532FF8BEF86B8796A035268FF4E0%40SG2PR02MB3532.apcprd02.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Hi Team,
django admin page has inline model.
models.py
-------------
admin.py
------------
=> using st-api.js, i have written ajax calls to filter the foreign fields based on the other fields input.
On selecting year, I have filtered the schedule based on year.
On
selecting Schedule, I have filtered the Income based on Schedule.
Like wise I have filtered other fields(Income, expense, fields)
On saving on admin page I am able to save the entries and same entries are rendered back when page gets refreshed.
But, the filtered values are not available in the drop downs. Instead dropdowns are showing all the choices.
Please help me out so that, after saving the entries, after page get refreshed, I need filtered dropdown list so that, we can update the dropdown list.(Ex : selected year, based on year schedule dropdown has filtered. I have selected one schedule and saved. Now page rendered back showing the selected schedule of that particular year. Now I need to select other schedule of the same year.)
Thanks in advance.
Regards,
Teja Y
LAMP