Keywords Must Be Strings When Passing Variable As Parameter
Keywords Must Be Strings When Passing Variable As Parameter Question: I’m trying to pass a variable as a keyword argument like this: @receiver(post_save, sender=BudgetTransaction) def create_forecasted(sender, instance, created, **kwargs): if instance.transaction_type == "EC": return True if created: today = instance.next_date last_day = date(today.year, 12, 31) this_month = today.month weeks_left = int((last_day – today).days / 7) …