I have a modelChoice field in my django model class whose choices is based on another model values. each time i add new entries to the latter model, the value does not reflect on my page untill i restart the server. below is my code:
from multiselectfield import MultiSelectField
class FirstModel(models.Model):
choices = [(x.pk,x.subject_title) for x in Subject.objects.all()]
choices = tuple(choices)
subjects_to_offer = MultiSelectField(choices=choices)
class Subject(models.Model):
# field declarations
now each time i update the Subject, the values does not reflect on the page until i restart the server. please how do i reload the First model without restarting the server. Many tanks P.S the MultiSelectField is package from https://github.com/goinnn/django-multiselectfield it is just like a choice field except it has some added features. if only i can figure a way of reloading the models without restarting the server then i'll be fine