[Solved]-Got AttributeError when attempting to get a value for field 'status_code'

1👍 answer: use related_name attr models.py class MedTest(models.Model): date_kit_ord = models.DateTimeField() test_date = models.DateTimeField() status = models.CharField(max_length=100) hiv4g_test_date = models.DateTimeField(blank=True, null=True) hivms_test_date = models.DateTimeField(blank=True, null=True) user = models.ForeignKey(User) class MedTestResult(models.Model): med_test_result = models.CharField(max_length=100) med_test = models.ForeignKey(MedTest, related_name=’med_tests’) result_date = models.DateTimeField(null=True, blank=True) test_started = models.DateTimeField(null=True, blank=True) status_code = models.CharField(max_length=25) value = models.IntegerField(null=True, blank=True) hiv4g_rsltdate = models.DateTimeField(null=True, … Read more

[Solved]-Django detecting redundant migrations repetitively

1👍 ✅ You could try using an existing package that will allow you to use a time zone directly as a model field. https://pypi.python.org/pypi/django-timezone-field/ class MyModel(models.Model): timezone1 = TimeZoneField(default=’Europe/London’) # defaults supported 👤Alex Carlos Making SSO with django rest framework 1👍 Try to copy the plain list of timezones from pytz to your project, so … Read more

[Solved]-Signalling server performance issue: Python vs NodeJS

2👍 NodeJS does its non-blocking I/O at a pretty low level and is backed by V8, which does pretty good JIT optimisations. Django channels are a higher-level construct, and performance will also heavily depend on the Python implementation. CPython, among other things, interprets bytecode directly and uses a global execution lock. I would expect NodeJS … Read more

[Solved]-Test if a celery task is still being processed

3👍 ✅ define a field (PickledObjectField) in your model to store the celery task: class YourModel(models.Model): . . celery_task = PickledObjectField() . . def task(): self.celery_task = SubmitTask.apply_async(args = self.task_detail()) self.save() In case your task is not specific on any model you should create one specifically for the celery tasks. or else I suggest using … Read more