Enhance django-admin 3 dependent dropdowns based off 1 value in the model.

Completed Posted 5 years ago Paid on delivery
Completed Paid on delivery

I have an existing django 2 application and would like to enhance django-admin to have some chained (dependent) dropdowns for one of my models.

I have used "[login to view URL]" previously but cant seem to use it for this scenario without extending my models to have an extra fields - which i do not want.

----------------------------

Requirements

----------------------------

Enhance the existing django-admin add/change to have 3 chained (dependent) dropdowns based off 1 value in the model.

I would prefer this done in pure javascript unless you there is an existing library that works without adding extra fields to the model.

----------------------------

[login to view URL]

----------------------------

Hopefully this gives you an idea of what I'm trying to do, essential we are creating a single view application, aggregating multiple datasources.

The model where the dependant dropdowns occur is ProductMapping

from [login to view URL] import models

#####################

# Data Source 1

######################

class DirectManager([login to view URL]):

manager_name = [login to view URL](max_length=255)

def __str__(self):

return str(self.manager_name)

class DirectProduct([login to view URL]):

direct_manager = [login to view URL](DirectManager, on_delete=[login to view URL])

product_name = [login to view URL](max_length=255)

def __str__(self):

return str(self.product_name)

#####################

# Data Source 2

######################

class EvestmentManager([login to view URL]):

manager_name = [login to view URL](max_length=255)

def __str__(self):

return str(self.manager_name)

class EvestmentProduct([login to view URL]):

evestment_manager = [login to view URL](EvestmentManager, on_delete=[login to view URL])

product_name = [login to view URL](max_length=255)

def __str__(self):

return str(self.product_name)

#####################

# Data Source 3

######################

class SharepointManager([login to view URL]):

manager_name = [login to view URL](max_length=255)

def __str__(self):

return str(self.manager_name)

class SharepointProduct([login to view URL]):

sharepoint_manager = [login to view URL](SharepointManager, on_delete=[login to view URL])

product_name = [login to view URL](max_length=255)

def __str__(self):

return str(self.product_name)

#####################

# Mapping Models

# Aggregate our datasources

######################

class ManagerMapping([login to view URL]):

direct_manager = [login to view URL](DirectManager, on_delete=[login to view URL])

evestment_manager = [login to view URL](EvestmentManager, on_delete=[login to view URL], null=True, blank=True)

sharepoint_manager = [login to view URL](SharepointManager, on_delete=[login to view URL], null=True, blank=True)

def __str__(self):

return str(self.direct_manager.manager_name)

#####################

# From the manager_mapping, find my manager and display the products which are related to that manager only

######################

class ProductMapping([login to view URL]):

manager_mapping = [login to view URL](ManagerMapping, on_delete=[login to view URL])

direct_product = [login to view URL](DirectProduct, on_delete=[login to view URL])

evestment_product = [login to view URL](EvestmentProduct, on_delete=[login to view URL], null=True, blank=True)

sharepoint_product = [login to view URL](SharepointProduct, on_delete=[login to view URL], null=True, blank=True)

def __str__(self):

return str(self.direct_product.product_name)

Django JavaScript Python

Project ID: #19029541

About the project

2 proposals Remote project Active 5 years ago

Awarded to:

segunupwork

Hello, If you haven't hired anyone already for the job, I will get it done as you described. I will customize the admin panel and make sure the models reflect in the drowndown menu. I hope to hear from you. Regards.

$35 AUD in 2 days
(0 Reviews)
0.0

2 freelancers are bidding on average $33 for this job

Aldala

I can do what you need, I have a lot of experience developing web interfaces (see portfolio), and I also have experience with python and django framework. I can start working on monday, and you can have it for tuesday More

$30 AUD in 1 day
(2 Reviews)
2.0