improve case form
This commit is contained in:
@@ -1052,6 +1052,25 @@ class AtlasUpdate(
|
||||
# #initial = {'date_of_death': '05/01/2018'}
|
||||
# exclude = [ 'created_date', 'published_date' ]
|
||||
|
||||
|
||||
#def get_object(self, queryset=None):
|
||||
# # Prefetch all related objects needed for the form and formsets
|
||||
# qs = self.model.objects.select_related(
|
||||
# # Add all FK fields here
|
||||
# ).prefetch_related(
|
||||
# "series__examination",
|
||||
# "series__plane",
|
||||
# "series__contrast",
|
||||
# "series__images",
|
||||
# "subspecialty",
|
||||
# "condition",
|
||||
# "presentation",
|
||||
# "pathological_process",
|
||||
# "differentialcase",
|
||||
# "caseresource_set",
|
||||
# )
|
||||
# return qs.get(pk=self.kwargs["pk"])
|
||||
|
||||
def get_form_kwargs(self):
|
||||
kwargs = super(AtlasUpdate, self).get_form_kwargs()
|
||||
kwargs.update({"user": self.request.user})
|
||||
|
||||
Reference in New Issue
Block a user