If all(sun_bool.is_valid() and sunday_formset. Return view_func(request, *args, **kwargs)įile "C:\Users\Admin\PycharmProjects\untitled7\appointments\views.py", line 111, in availability_update_view Response = wrapped_callback(request, *callback_args, **callback_kwargs)įile "C:\Users\Admin\PycharmProjects\untitled7\venv\lib\site-packages\django\contrib\auth\decorators.py", line 21, in _wrapped_view Response = self.process_exception_by_middleware(e, request)įile "C:\Users\Admin\PycharmProjects\untitled7\venv\lib\site-packages\django\core\handlers\base.py", line 113, in _get_response '']įile "C:\Users\Admin\PycharmProjects\untitled7\venv\lib\site-packages\django\core\handlers\exception.py", line 34, in innerįile "C:\Users\Admin\PycharmProjects\untitled7\venv\lib\site-packages\django\core\handlers\base.py", line 115, in _get_response Return render(request, 'appointment/availability_update_new.html', sender=settings.AUTH_USER_MODEL)ĭef create_sunday_appointment_bool(instance, created, **kwargs): 'sun_bool': sun_bool, 'sunday_formset': sunday_formset Sunday_formset = SundayInlineFormSet(instance=sun_obj, prefix='id_sunday_formset') Sun_bool = SundayBoolForm(instance=sun_obj) Messages.success(request, f'You have successfully updated your availability!') # I feel there is something missing here? Sun_bool_instance = sun_bool.save(commit=False) If all(sun_bool.is_valid() and sunday_formset.is_valid()): Sunday_formset = SundayInlineFormSet(request.POST, request.FILES, instance=sun_obj, prefix='id_sunday_formset') Sun_bool = SundayBoolForm(request.POST, request.FILES, instance=sun_obj) First Integrity Title offers a centralized experienced team for the products and services selected, and efficient and reliable service. Sun_obj = get_object_or_404(MyUser, id=pk) SundayInlineFormSet = inlineformset_factory(MyUser, SundayTime, form=SundayTimeForm, extra=0,Ĭan_delete=True, min_num=0, validate_min=True, max_num=3, validate_max=True,įields=['sun_to_hour', availability_update_view(request, pk, *args, **kwargs): Super(SundayBoolForm, self)._init_(*args, **kwargs) Sunday_bool = forms.BooleanField(required=False) Sun_to_hour = models.TimeField(choices=HOUR_CHOICES, null=True, blank=True) Sun_from_hour = models.TimeField(choices=HOUR_CHOICES, null=True, blank=True) GEORGE, UT 84770 Business Phone (801) 996-7567 Internet Email MDIGERONIMOFIRSTINTEGRITYTITLE. Related_name='teacher_time_available_id') Details for FIRST INTEGRITY TITLE INSURANCE AGENCY LLC Organization Details Name FIRST INTEGRITY TITLE INSURANCE AGENCY LLC Address 134 N 200 E SUITE 203 ST. Teacher_id_time = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, null=True, blank=True, Sunday_bool = models.BooleanField(null=False, default=True) Related_name='teacher_bool_available_id') Teacher_id = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, null=True, blank=True, After a bit of research and trial and error, I'm at loss here. I stupidly assumed django just handled the fact that the boolean value is saved as a string in the database(PostgreSQL) because it did successfully after a signal saved it initially after a new user signed up. I get the type error 'bool' object is not iterable and I'm not quite sure why. We consistently strive to hire team members that exude strength both professionally and personally from their past experiences and within their current lives and skill sets. Thank you for your interest in First Integrity we look forward to an opportunity to work with you and to your satisfaction.I am trying to save a boolean field in a model form. At First Integrity Title we focus on strength, service and stability not only externally, but internally as well. Our marketing department can help you grow your business, and our continuing education classes will keep you abreast of the market and current laws. You can order title directly through Calyx, Encompass, and E-contracts, or you can use our webpage to order online, search comparables, and order O
0 Comments
Leave a Reply. |