Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
How do I filter out students to sections in django?
I am very new at Django and I've been struggling to figure out what to do. I am currently making a Learning Management System Project where in teachers can create a course and under that course there are specific students who are enrolled. The problem is I do not know how to do that. Basically this is what i want to happen: Each student has its own section and 1 section has its own courses. -
Adding forms dynamically to a Django formset
Dynamically adding forms to a formset with jQuery Hey everyone Basically, I have this Django code which I try to make Formset with jQuery. It allows user dynamically add/remove Form-set The problem is a management_form. It wan't increment prefix with TOTAL_FORMS. They still 0 at all fields that I have added. Any help is appreciated models class Product_added(models.Model): customer = models.ForeignKey(Customer, on_delete=models.CASCADE, null=True, blank=True,related_name='customer_product_added') products = models.ForeignKey(Product, on_delete=models.CASCADE, null=True, blank=True, related_name='product_added_product') service = models.CharField(max_length=200, choices=SERVICE_A, blank=True, null=True) product_add = models.CharField(max_length=200, choices=PRODUCT, blank=True, null=True) quantity = models.IntegerField(null=True, blank=True, choices=QUANTITY) forms class Product_addedForm(forms.ModelForm): class Meta: model = Product_added fields = ['service','product_add','quantity','total_price_added','notes' ] views def ProductCreateView(request, pk): customer = get_object_or_404(Customer, pk=pk) formset_addedFormset = modelformset_factory(Product_added, form=Product_addedForm) form = PersonCreationForm() formset = formset_addedFormset(queryset=Product_added.objects.none(), prefix="product_added_product") if request.method == 'POST': form = PersonCreationForm(request.POST or None) formset = formset_addedFormset(request.POST or None, queryset=Product_added.objects.none(), prefix="product_added_product") if form.is_valid() and formset.is_valid(): new_form = form.save(commit=False) new_form.customer=customer new_form.save() try: for form in formset: new_formset = form.save(commit=False) new_formset.products = product new_formset.save() except: pass messages.success(request, 'good') return redirect('product_list') else: messages.warning(request,'not good') return redirect('product_create',pk) context = {'customer':customer, 'formset':formset, 'form':form } return render(request, 'product_create.html',context) html template {% extends 'base.html' %} {% load static %} {% load crispy_forms_tags %} {% block content %} <form method="POST"> {% csrf_token %} <h3>Add … -
Getting the error "TemplateDoesNotExist at / index.html" when runnig a django project
I tried few of the solutions I found with no success. Here is the urls.py file (the settings.py was too long for posting this question): urls.py from django.contrib import admin from django.urls import path from django.views.generic import TemplateView from django.conf.urls import include admin.site.site_header = 'Marked By Covid Admin' urlpatterns = [ path('grappelli/', include('grappelli.urls')), path('admin/', admin.site.urls), path('', TemplateView.as_view(template_name='index.html'), name='index'), ] Please tell me which part of the settings.py is needed to solve the issue, and I'll add it. I'd be grateful for your suggestions regarding what's wrong. Thanks! -
can't use django admin list_filter on reverse related date field
I have 2 models involved. class Purchase(): ...... class PremiumBill(): purchase = models.ForeignKey paid_at = models.DateTimeField in my admin.py in the PurchaseAdmin list_filter = ("premiumbill__paid_at",) it gives me this error Filtering by premiumbill__paid_at__gte not allowed -
How to link two projects in VS code (integrate two projects)
I have a project in VS code locally running. I want to link my project to another project (cloning from git hub). I mean I want to place a link which should go to the second project after clicking. I cloned second project in the folder of the first project. I am confused now, and I don't know what should I do or from which file I should start to link them. -
Manage tow Signals in two different apps in Django
i have two Django applications, blogApp and accounts, when i created a signal file for blogapp that can slugify title after saving the model into database, this works perfectly. But when i added the second signal file to accounts that can create profile to the user when he finished his registration, it shows me this error: , and when i check the admin section, i can see the profile has been successfully created. PostModel in blogApp application: Signals in blogApp application: ProfileModel in accoounts application: Signals in accounts application: So, how can i create the user profile without indexing to Post signals. Because what i'm thinking is the two signals of two apps is activating after the user press register. My link to GitHub project: GitHub project -
How would I implement a system where a specific user signs up to a specific event (Django)?
I want to create and app for signing up to events however I have come up to a hurdle. I have created this system in which a user gets added to an event when they trigger a view however when doing this the user signs up to all events, instead of just one. How would I do it so the user signs up to the event they are choosing? models.py: from django.db import models from django.contrib.auth.models import User class UserA(models.Model): user = models.ForeignKey(User, null=True, on_delete=models.SET_NULL) def __str__(self): return self.user.username class systemTitle(models.Model): title = models.CharField('Title', max_length=300) time = models.DateTimeField('Time') place = models.CharField('Place', max_length=500) description = models.TextField('Description') people = models.IntegerField('Free Spaces', default=50) users = models.ManyToManyField(UserA, blank="True") class Meta: verbose_name = 'Event' verbose_name_plural = 'Events' def __str__(self): return self.title return self.place views.py: from django.shortcuts import render from .models import systemTitle from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from email.message import EmailMessage import smtplib @login_required def index(request): latest_activities = systemTitle.objects.order_by('-time')[:5] context = {'latest_activities': latest_activities} return render(request, 'systema/index.html', context) def details(request, systemTitle_id): try: systemT = systemTitle.objects.get(pk=systemTitle_id) except systemTitle.DoesNotExist: print('error') return render(request, 'systema/details.html', { 'systemT' : systemT }) def success(request, systemTitle_id): user = request.user user_email = user.email systemT = systemTitle.objects.get(id=systemTitle_id) systemT.people -= 1 systemT.users.create(user=user) systemT.save() … -
What does NOT NULL constraint failed: generalpage_userregister.user_id mean and how is the issue resolved in my case?
I'm trying to create a website using Django but have an issue I've been struggling with for a few hours. Can someone explain why I recieve: NOT NULL constraint failed: generalpage_userregister.user_id error and how to resolve this issue? I suspect it has something to do with the pk but I can't get my head around this. I'm trying to create a custom model and when I try to create a superuser, I get the error mentioned above. my view is: page = "create-account" form = UserRegisterForm() if request.method == "POST": form = UserRegisterForm(request.POST) if form.is_valid(): userRegister = form.save(commit=False) userRegister.user = request.user(id=pk) #user.username = user.username.lower() userRegister.save() #login(request, userRegister) return redirect("generalpage:home-page") else: form = UserRegisterForm() context = {"form": form, "page": page} return render(request, "generalpage/create_account.html", context) ``` My urls are: ``` from django.urls import path from . import views app_name = "generalpage" urlpatterns = [ path("hem/", views.home, name="home-page"), path("registrering/", views.registerprofile, name="register-page"), path("logga-in/", views.loginpage, name="login-page"), path("logga-ut", views.logoutuser, name="logoutuser"), path("skapa-annons/", views.createroom, name="createroom-page"), path("skapa-konto/<str:pk>/", views.createaccount, name="createaccount-page"), path("radera-rum/", views.deleteroom, name="deleteroom"), path("uppdatera-rum/", views.updateroom, name="updateroom"), ] ``` the models is: ``` from datetime import datetime import email from email import message from email.policy import default from enum import unique from pyexpat import model from wsgiref.validate import validator from django.db … -
Show type string on a Django webpage instead of bytes?
I am trying to get the contents of an XML file stored in an S3 bucket to show as text in the browser. However, it just displays as numbers (bytes) rather than a legible string. My code (views.py): def file_content(request): file_buffer = io.BytesIO() s3_client = boto3.client("s3", "eu-west-1") s3_client.download_fileobj("mybucket", "myfolder/exmaple.xml", file_buffer) file_content = file_buffer.getvalue() return HttpResponse(file_content) What I've tried I've tried changing this line: file_content = file_buffer.getvalue() To: file_content = file_buffer.getvalue().decode("utf-8") Or: file_content = str(file_buffer.getvalue()) But it is still displaying as bytes in the browser. The actual file content displays as a string when using print() in the console but not in the browser. I'm not sure whats going wrong? Thank you for your time. -
error datefiled input when add new record
I have next problem. I have models: Period and CompletedWork class Period(models.Model): date = models.DateField() def __repr__(self): return self.date class CompletedWork(models.Model): period = models.ForeignKey(directory.Period, on_delete=models.SET('deleted date'), ) worker = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=models.SET('deleted worker'), related_name='worker_do', default=settings.AUTH_USER_MODEL ) work_done = models.ForeignKey(directory.WorksType, on_delete=models.SET('deleted works type')) work_scope = models.FloatField(blank=True, null=True) work_notes = models.CharField(_("Comments"), max_length=70, blank=True, null=True, ) record_author = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=models.SET('deleted user'), related_name='record_author', auto_created=True, ) record_date = models.DateTimeField(auto_now=True) checked_by_head = models.BooleanField(default=False) active = models.BooleanField(default=True) def __repr__(self): return f'{self.period}, {self.worker}, {self.work_done}' def __str__(self): return self.__repr__() def is_active(self): if self.active: return True return False def __str__(self): return str(self.__repr__()) In the forms I make a widget for Date input: class CompletedWorkForm(forms.ModelForm): class Meta: model = CompletedWork fields = ( 'period', 'worker', 'work_done', 'work_scope', 'work_notes', ) widgets = { 'period': DatePickerInput(), } widget.py looks like this: class DatePickerInput(forms.DateInput): input_type = 'date' my view: class CreateCompletedWorkView(LoginRequiredMixin, SuccessMessageMixin, CreateView): model = CompletedWork form_class = CompletedWorkForm template_name = 'completed_work_add.html' success_url = reverse_lazy('completed_work_list') success_message = f'Record successfully added' def get_form_kwargs(self): kwargs = super(CreateCompletedWorkView, self).get_form_kwargs() kwargs['user'] = self.request.user return kwargs def form_valid(self, form): form.instance.record_author = self.request.user return super().form_valid(form) And now I have a problem creating a new record: "Select a valid choice. That choice is not one of the available choices." Please … -
Automatically count elements in ManyToMany Django model
I'm looking for a way to count a number of "reserved" objects inside of "IPSubnetAllocation" class that I've created (if at all possible?). Effectively what I'm doing is allocating smaller IP subnets within a larger block "IPBlockAllocation" e.g: Parent Prefix: 192.168.0.0/24 Child Prefix: 192.168.0.0/31 192.168.0.2/31 Omitted... 192.168.254/31 I can assign a child prefix to an interface (any network device) and set it's reserved status to True. This means it's no longer available for reservation (this logic is outside of scope). What I would like however is to automatically increment / decrement count of "subnets_reserved" of the "IPBlockAllocation". class IPSubnetAllocation(models.Model): parent_prefix = models.ForeignKey( 'IPBlockAllocation', null=True, on_delete=models.CASCADE ) subnet = models.CharField( blank=True, null=True, unique=True, max_length=15) assigned_interface = models.ForeignKey( DeviceInterfaces, null=True, on_delete=models.CASCADE) reserved = models.BooleanField(default=False) role = models.CharField(choices=IP_BLOCK_ROLE, default='Select', max_length=10) class IPBlockAllocation(models.Model): name = models.CharField(unique=True, max_length=255) prefix = models.GenericIPAddressField( blank=True, null=True, unique=True, validators=[validate_ipv4_address]) mask = models.IntegerField(choices=SUBNET_MASK, default='Select') subnets = models.ManyToManyField(IPSubnetAllocation, blank=True) subnets_count = models.IntegerField(blank=True, null=True) subnets_reserved = models.IntegerField(default=0, blank=True, null=True) role = models.CharField(choices=IP_BLOCK_ROLE, default='Select', max_length=10) -
uwsgi does not show 2xx and 3xx responses in the log
For testing purposes I need to see all the requests that come to my uwsgi application (and Django behind it), but I only see 4xx and 5xx, here is my uwsgi.ini config: [uwsgi] http-socket = :8080 ;chdir = /code/ module = app.wsgi:application master = true processes = 2 #logto = ./uwsgi.log logdate = %%d/%%m/%%Y %%H:%%M:%%S vacuum = true buffer-size = 65535 stats = 0.0.0.0:1717 stats-http = true max-requests = 5000 memory-report = true ;touch-reload = /code/config/touch_for_uwsgi_reload pidfile = /tmp/project-master.pid enable-threads = true single-interpreter = true log-format = [%(ctime)] [%(proto) %(status)] %(method) %(host)%(uri) => %(rsize) bytes in %(msecs) msecs, referer - "%(referer)", user agent - "%(uagent)" disable-logging = true ; Disable built-in logging log-4xx = true ; but log 4xx's anyway log-5xx = true ; and 5xx's log-3xx = true log-2xx = true ignore-sigpipe = true ignore-write-errors = true disable-write-exception = true ;chown-socket=www-data:www-data -
How to fetch the list of Estimate records using SuiteScript in Netsuite
I am unable to fetch the List of Estimate records using SuiteScript in Netsuite. I have used the same script for the CUSTOMER records and it is working fine but when I am using the same for ESTIMATE records but it is not working. Here is my SuiteScript code: define(['N/https','N/query'], function (https, query) { /** * @NApiVersion 2.1 * @NScriptType WorkflowActionScript */ const exports = {}; function onAction(context) { // Create a query definition on estimate records let myEstimateQuery = query.create({ type: query.Type.ESTIMATE }); // Create conditions for the query let firstCondition = myEstimateQuery.createCondition({ fieldId: 'Opportunity', operator: query.Operator.EMPTY_NOT }); myEstimateQuery.condition = myEstimateQuery.and(firstCondition); // Create query columns myEstimateQuery.columns = [ myEstimateQuery.createColumn({ fieldId: 'id' }), myEstimateQuery.createColumn({ fieldId: 'custbody_quote_internal_id' }), myEstimateQuery.createColumn({ fieldId: 'tranid' }), myEstimateQuery.createColumn({ fieldId: 'externalid' }), myEstimateQuery.createColumn({ fieldId: 'currency' }), myEstimateQuery.createColumn({ fieldId: 'duedate' }), myEstimateQuery.createColumn({ fieldId: 'enddate' }), myEstimateQuery.createColumn({ fieldId: 'startdate' }), myEstimateQuery.createColumn({ fieldId: 'subtotal' }), myEstimateQuery.createColumn({ fieldId: 'custbody_tran_term_in_months' }), myEstimateQuery.createColumn({ fieldId: 'custbody_end_user' }), myEstimateQuery.createColumn({ fieldId: 'custbody_qumu_deployment_type' }), myEstimateQuery.createColumn({ fieldId: 'custbody_qumu_orig_renewal' }), myEstimateQuery.createColumn({ fieldId: 'custbody_qumu_target_renewal' }) ]; // Run the query let resultSet = myEstimateQuery.run(); log.debug('resultSet>> ', resultSet); log.debug('resultSet.length>> ', resultSet.results.length); log.debug('resultSet.results>> ', resultSet.results); } exports.onAction = onAction; return exports; }); -
Reduce db queries in Django view
looks like its doing 3 queries, how can I simplify it so that it makes only 1 db query? employee = Employee.objects.get(email=self.request.user.email) filter_args = Q(internal=False) if ProjectPM.objects.filter(user=employee): filter_args = Q(projectpm=None) | Q( projectpm__user=employee, projectpm__start_date__lte=today, projectpm__end_date__gte=today, ) elif ProjectSales.objects.filter(user=employee): filter_args = Q(projectsales=None) | Q( projectsales__user=employee, projectsales__start_date__lte=today, projectsales__end_date__gte=today, ) if filter_args: qs = qs.filter(filter_args) -
HTML imported picture doesn't appear on Website
I tried to import a picture to an HTML Website, the Image is in the same folder as the template is and I made a css class to import the image. When I look on the Website I see the frame of the image but there is only a question mark in it, I am working with Django if that matters. I appreciate any help. Mac user <div> <img class="header.jpg" src="header.jpg"> </div> } .header-image { width: 100%; } .image-container { background-color: azure; padding: 16px; padding-left: 150px; padding-right: 150px; } -
showing template does not exist after deploying react+django project to heroku when open app
i deployed my django+react project after creating requirement.txt,procfile and package.json in project dirctory . After npm run build, i recieved a build folder containg index.html which neede to be connnected with the url.py in project file ,eventhough i connected still in heroku it is showing templateDoesnotExist settings.py ___________ BASE_DIR = Path(__file__).resolve().parent.parent TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [ os.path.join(BASE_DIR,'build') ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'backend.wsgi.application' urls.py ________ from django.contrib import admin from django.urls import path,include, re_path from django.conf import settings from django.conf.urls.static import static from django.views.generic import TemplateView urlpatterns = [ path('admin/', admin.site.urls), re_path('.*', TemplateView.as_view(template_name='index.html')), # path('api/',include('base.urls')), ] urlpatterns += static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT) [1]: https://i.stack.imgur.com/2lKl1.jpg -
ElephantSQl configurations for Django project
I'm trying to have a DJANGO project on VERCEL which wouldn't let me use sqlite3, so I decided to use the ElephantSQL for my project and I created an account and have the URL but I don't have any idea how to do the configurations for DJANGO . I've searched all around YOUTUBE and StackOverFlow but didn't find anything helpful. can anyone PLEASE help me with this ? where should I start from ? -
Override django's foreignkey on_delete SET_NULL function
So, I have a Comment model in a django project I am trying to make, what I want to do is to override the on_delete function of the ForeignKey COMMENT_TYPES = ( (1, "Comment"), (2, "Reply to a comment")) class Comment(models.Model): author = models.ForeignKey(User, on_delete=models.CASCADE) comment_text = models.CharField(max_length=80, blank=False, null=False) id = models.UUIDField(default=uuid.uuid4, unique=True, primary_key=True,editable=False) date_created = models.DateTimeField(auto_now_add=True) date_edited = models.DateTimeField(auto_now=True) post = models.ForeignKey(Post, on_delete=models.CASCADE) parent_comment = models.ForeignKey('self', blank=True, null=True, on_delete=models.SET_NULL) comment_type = models.IntegerField(choices=COMMENT_TYPES, default=1) What I want is that when I delete a comment, then all the comments that were linked to the deleted comment, their comment_type should change from 2('reply to a comment') to 1('comment'), so is there a way to override the on_delete function, SET_NULL so that I can change the value in the comment_type field? -
channels get consumer without import
when working with models, to avoid cyclical import: from articles.models import Ariticle # switch to from django.apps import apps Article = apps.get_model('articles.Article') is there a similar way with consumer: from chat.consumers import ChatConsumer # switch to ChatConsumer = I am trying to access to another consumer from one inside: class NoteConsumer(AsyncJsonWebsocketConsumer): @database_sync_to_async def noteOffline(self): from chat.consumers import ChatConsumer user = User.objects.get(pk=int(self.scope['user'].pk)) user.chatProfile.online = False user.save() for cp in user.chatProfile.getRecentContact(): ChatConsumer.send_offline(user.pk, cp.pk) I will be more than glad if you can give me a hand. -
Mutiple user's manger is not found
Hey everybody I bulid I simple website for techers reservations and when I want to signup as techers or student I have that errors Manger isn't available auth.user has swapped for account's.user -
Django Channels send message to another channel layer
let me simplify my question in one sentence: in one consumer, how can I access to another consumer to send message? basically, I have two consumers in seprated apps: note consumer in note app to manage system and crud notifications. chat consumer in chat app to manage social messaging application = ProtocolTypeRouter({ "http": django_asgi_app, "websocket": AllowedHostsOriginValidator( SessionMiddlewareStack( AuthMiddlewareStack( URLRouter( [ path('ws/chat/<int:pk>/', ChatConsumer.as_asgi()), path('ws/note/<int:pk>/', NoteConsumer.as_asgi()), ] ) ) ) ), }) I am implementing online status function. it works like this: note ws connection establishes in every page, as long as you are on our site, you have a notification ws to receive notification. this correspond to the idea of online, therefore, we can save online record to True in db on note ws connection, and False when disconnect, to indicate online status. class NoteConsumer(AsyncJsonWebsocketConsumer): @database_sync_to_async def noteOnline(self): user = User.objects.get(pk=int(self.scope['user'].pk)) user.chatProfile.online = True user.save() @database_sync_to_async def noteOffline(self): user = User.objects.get(pk=int(self.scope['user'].pk)) user.chatProfile.online = False user.save() async def connect(self): # ... await self.noteOnline() async def disconnect(self): # ... await self.noteOffline() in chat friends view, user may want to know if the target he/she is talking to logged off or not, without ws implementation, the information will not be updated immediately, they need … -
Django errors after fake migrations
someone can help me with these errors! I get these errors after replacing my postgresql database and doing the migration all this happened after replacing a postgres backup in execute return self._execute_with_wrappers( File "C:\Users\Facu\Desktop\proyecto_biblioteca\entorno\ibro\lib\site-packages\django\db\backends\utils.py", line 80, in _execute_with_wrappers return executor(sql, params, many, context) File "C:\Users\Facu\Desktop\proyecto_biblioteca\entorno\ibro\lib\site-packages\django\db\backends\utils.py", line 84, in _execute with self.db.wrap_database_errors: File "C:\Users\Facu\Desktop\proyecto_biblioteca\entorno\ibro\lib\site-packages\django\db\utils.py", line 91, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "C:\Users\Facu\Desktop\proyecto_biblioteca\entorno\ibro\lib\site-packages\django\db\backends\utils.py", line 89, in _execute return self.cursor.execute(sql, params) django.db.utils.ProgrammingError: no existe la relación «django_content_type» LINE 1: ..."."app_label", "django_content_type"."model" FROM "django_co... -
Django conditional required fields - in both DRF and Model.save
My model has a type attribute and get_required_fields method. get_required_fields returns a list of required fields based on self.type which I then use in full_clean method to validate the model before saved for field in self.get_required_fields(): if getattr(self, field, None) is None: missing_fields.append(field) # todo append verbose_name if missing_fields: raise ValidationError({x: "Povinné pole pre daný druh" for x in missing_fields}) The problem is that this doesn't work for DRF model serializers. I've overriden validate method this way: def validate(self, attrs): Income(**attrs).full_clean() return super().validate(attrs) But then I realized this will not work for PATCH method and probably also not for POST with missing fields How can I make it work for both model and DRF ModelSerializer while using the same code to keep it DRY? -
Having trobles Django + Telethon
I am going to make a Django applicaton that gets telegram username as input and sends message to that username. Currently using Telethon, and creating some account in Telegram to make this possible. But my telethon threads not gonna work. Account connected and working properly (session 'anon'). Here is the views.py: from django.shortcuts import render from telethon.sync import TelegramClient from django_telethon.sessions import DjangoSession from django_telethon.models import App, ClientSession from telethon.errors import SessionPasswordNeededError API_ID = '12345678' API_HASH = '123465789456123asdas' def index(request): if request.method == "POST": app, is_created = App.objects.update_or_create( api_id=API_ID, api_hash=API_HASH ) cs = ClientSession.objects.get( name='anon' ) telegram_client = TelegramClient(DjangoSession(client_session=cs), app.api_id, app.api_hash) target_user = request.POST['username_telegram'] target_user = str(target_user) async def send(): try: await telegram_client.send_message(f'@{target_user}', 'Hello from django!') except ValueError: print(f'Sorry no {target_user} user was found') with telegram_client: telegram_client.loop.run_until_complete(send()) return render(request, 'index.html') Output: enter image description here -
Struclog events are misaligned in the console when executing Celery tasks
I use structlog and celery in my Django application and I'm having hard time when logging tasks with structlog in the console. Indeed, events are not properly aligned when printed in the console during a Celery task is being executed. When more tasks are executed logs are barely readable. clear_contextvars and reset_contextvars at the top of the tasks doesn't change the issue. What could be the reason for this misalignment ? Console celery_worker-1 | 2022-10-09T12:25:57.251196Z [info ] Fetch orders complete [account.tasks] account=Anna celery_worker-1 | 2022-10-09T12:25:57.934244Z [info ] Fetch trades [account.tasks] account=Anna length=0 symbol=BBB celery_worker-1 | 2022-10-09T12:25:58.896769Z [info ] Fetch trades [account.tasks] account=Anna length=1 symbol=BBB celery_worker-1 | 2022-10-09T12:25:58.911502Z [info ] Fetch trades complete [account.tasks] account=Anna celery_worker-1 | 2022-10-09T12:25:58.974451Z [info ] Update assets inventory [2022-10-09T12:25:58.976925Zpnl.tasks] account=Anna celery_worker-1 | [info ] Fetch orders [account.tasks] account=Nico celery_worker-1 | 2022-10-09T12:25:58.989326Z2022-10-09T12:25:58.990257Z [info ] Update contracts inventory [pnl.tasks] account=Anna celery_worker-1 | [info ] Update assets inventory no required [pnl.tasks] account=Anna celery_worker-1 | 2022-10-09T12:25:59.011112Z [info ] Update contracts inventory no required [pnl.tasks] account=Anna celery_worker-1 | 2022-10-09T12:26:00.380746Z [info ] Fetch orders complete [account.tasks] account=Nico celery_worker-1 | 2022-10-09T12:26:01.222383Z [info ] Fetch trades [account.tasks] account=Nico length=0 symbol=ABC celery_worker-1 | 2022-10-09T12:26:01.570339Z [info ] Fetch trades [account.tasks] account=Nico length=1 symbol=ABC celery_worker-1 | 2022-10-09T12:26:01.588788Z …