Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
The joined is located outside of the base path component
Good Morning Everyone, I developed an app in Django (latest version). On local server it is working well. But for deployment when I run command for collect static then the error occurred The joined path (C:\Users\Galaxy\PycharmProjects\plugins\js_composer\assets\images\icons\address-book.png) is located outside of the base path component (C:\Users\Galaxy\PycharmProjects\medical_store\staticfiles). I'm using HTML and Bootstrap for front-end but this path error occurred. It's my terminal showing return safe_join(self.location, name) File "C:\Users\Galaxy\AppData\Local\Programs\Python\Python39\lib\site-packages\django\utils\_os.py", line 29, in safe_join raise SuspiciousFileOperation( django.core.exceptions.SuspiciousFileOperation: The joined path (C:\Users\Galaxy\PycharmProjects\plugins\js_composer\assets\images\icons\address-book.png) is located outside of the base path component (C:\Users\Galaxy\PycharmProjects\medical_store\staticfiles) I tried to replace the url that was first looking as {background-image:url(../../../plugins/js_composer/assets/images/icons/address-book.png)} then I replace it by {background-image:url(../../../medical_store/static/img/address-book.png)} But same error found. I don't know how to remove this error. Have you any idea what I have to do exactly? Here is my settings for staticfiles. STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') STATIC_URL = '/static/' MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') STATICFILES_DIRS = [ os.path.join(BASE_DIR, 'static') ] STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' -
How to remove a content type in a migration in Django 1.11?
I have a model (let's name it Material) that was originally created in a monolithic app (let's call it A). In order to divide this monolith into separate apps according to the business domain logic, we created a model with the same name in a new app (B) and performed a data migration from A to B. We then removed the model from the app A. In one of our views, we use a filter of elements which relies on ContentTypes to list the names of models by apps, For this, we use ContentType.objects.get_for_models() with the list of classes (which contains B.Material, but not A.Material), but an error occurs: NoneType' object has no attribute '_meta This is because the class of A.Material is gone from the code, but is still present in the ContentType table. When calling get_for_models(), it seems to search for combinations of model and app_label instead of going with the list we provide. The filter() result in there would have A.Material and B.Material, and later on have the error because of A.Material. While I find the behavior of get_for_models() strange in that regards, I believe the issue is the stale ContentType. Is there a safe way to … -
Why does sorting by related_id not work on django admin change list page?
Please consider some arbitrary model with a foreignkey to another model (in Django 3.2): class SomeModel(models.Model): related = models.ForeignKey(to=OtherModel, ...) Now, we can show the related_id on the admin change list page, for example: class SomeModelAdmin(admin.ModelAdmin): list_display = ['related_id', ...] The problem is: this does not allow sorting by related_id. Now, there's at least one way around this, e.g. using admin.display ordering (or the good old admin_order_field): class SomeModelAdmin(admin.ModelAdmin): list_display = ['display_related_id', ...] @admin.display(description='related id', ordering='related_id') def display_related_id(self, obj): return obj.related_id Another alternative would be to use related instead of related_id (in list_display), then setting OtherModel.__str__ to return the id, but this may have side effects outside the admin. These workarounds do the job, but the question remains: Why can we not sort by related_id out-of-the-box? -
Module parse failed: Unexpected token (8:15), WebPack 5, React, Django
So Im a noob to all of this and have been following this tutorial https://www.youtube.com/watch?v=GieYIzvdt2U but for the life of me can not seem to get this to work. There are many related questions but despite my best efforts I have not been able to get past this error trying any of the existing solutions. When I run npm run dev I get the following Module parse failed: Unexpected token (8:15) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See http s://webpack.js.org/concepts#loaders | class App extends Component { | render() { > return <div>React APP</div> | } | } @ ./GeoAnalyticsSite/frontend/src/index.js 1:0-35 webpack 5.47.0 compiled with 1 error in 69 ms Here are all of my NPM dev dependencies and the scripts in my package json { ... "scripts": { "dev": "webpack --mode development ./GeoAnalyticsSite/frontend/src/index.js -o ./GeoAnalyticsSite/frontend/static/frontend/", "build": "webpack --mode production ./GeoAnalyticsSite/frontend/src/index.js -o ./GeoAnalyticsSite/frontend/static/frontend/," }, ... "devDependencies": { "@babel/core": "^7.14.8", "@babel/preset-env": "^7.14.8", "@babel/preset-react": "^7.14.5", "babel-loader": "^8.2.2", "babel-plugin-transform-class-properties": "^6.24.1", "webpack": "^5.47.0", "webpack-cli": "^4.7.2" }, ... } The error message makes it sound as if it is an issue with my webpack. Here are my babelrc { "presets": ["@babel/preset-env", "@babel/preset-react","env", … -
Inserting PDFS into xhtml2pdf
I hope my problem is not too unique. I am using the Django frame work and the xhtml2pdf library. {% for part_workorder in partsReceived %} {%if part_workorder.cert_document %} <div class="imgHolder"> <img src="{{part_workorder.cert_document.path }}" /> </div><img src="{{part_workorder.cert_document.path }}" /> Each of my 'Parts' are associated with a certification document which insert into a pdf using the xhtml2pdf library. This works perfect for jpegs and pngs. The problem comes in when I one of the certification documents is a pdf. The is page is left blank. Perhaps this is because the pdf(certification document) I am inserting into the generated pdf(created with xhtml2pdf) is more than one page. My solution: Use a template tag( passing the path as a parameter ) and break up the image into multiple jpegs, return an array of images. Incomplete solution: from pdf2image import convert_from_path register = template.Library() @register.filter def get64(path): images = convert_from_path(path) for i in range(len(images)): images[i].save('page' + str(i) + '.jpg', 'JPEG') print(images[i]) # Save pages as images in the pdf I know this is not the correct attempt... Any suggestions and help will be greatly appreciated! -
How do I inherit class functions into a Django Model?
I'm trying to inherit functions from a class into a Django model so I can call the class functions using an instance of the model. In the below example, I want to inherit the class DoStuff into the model MainModel so I would receive the following output: >>> m = MainModel(var1=3, var2=4) >>> m.do_stuff.add() 7 models.py: from django.db import models class DoStuff: def __init__(self, x, y): self.x = x self.y = y def add(self): return self.x + self.y class MainModel(models.Model): var1 = models.IntegerField() var2 = models.IntegerField() do_stuff = DoStuff(var1, var2) #How do I correctly do this? I know this problem may seem a bit trivial, but it's a simplification of a greater issue I'm trying to solve. Thank you for reviewing my question! -
How to display all characters such as \s, \t and \n written in a form
In a simple form, I want to display all the written characters such as \n, \t or \s character. That's sort of the feature you can find in text editors like Notepad++ that I'm looking for. By the way, I'm using Django as a framework but any lead in HTML or Javascript or whatever is welcome. -
webflow js and css not being loaded into django templates via static
I started to use webflow recently and getting the js and css files to load from _base.html has been a nightmare. Despite all the static images loading fine, using <script src="{% static 'js/webflow.js' %}" type="text/javascript"></script> inside _base.html to extend into other templates does not work. It is strange because the inspector shows that the js file exists. -
Django Rest Framework not validating all model's fields
I searched for this problem everywhere without being able to find an answer though it seems basic DRF usage, so I might be missing sth. I have a Customer model with certain required fields: from django.db import models from django.utils.translation import gettext_lazy as _ from applications.core.models.country import Country from applications.core.models.customer_states.customer_state import \ CustomerState class Customer(models.Model): class Meta: verbose_name = _('customer') verbose_name_plural = _('customers') user_email = models.EmailField(_('email'), max_length=100, unique=True, default=None) complete_name = models.CharField(_('complete name'), max_length=200, default=None) phone = models.CharField(_('phone'), max_length=50, default=None) country = models.ForeignKey(Country, models.PROTECT, verbose_name=_('country'), default=None) city = models.CharField(_('city'), max_length=100, default=None) city_state = models.CharField(_('city state'), max_length=100, default=None) address = models.CharField(_('address'), max_length=100) zip_code = models.CharField(_('zip code'), max_length=50, default=None) customer_state = models.OneToOneField(CustomerState, models.PROTECT) notes = models.TextField(_('notes'), max_length=200, blank=True, null=True) And I have this serializer: from rest_framework import serializers from applications.core.models.customer import Customer from applications.core.models.customer_states.implementations.pending_manual_validation_state import \ PendingManualValidationState class CustomerSerializer(serializers.ModelSerializer): class Meta: model = Customer fields = '__all__' def to_internal_value(self, data): self.add_default_state_if_missing(data) return super(CustomerSerializer, self).to_internal_value(data) @staticmethod def add_default_state_if_missing(data): data['customer_state'] = PendingManualValidationState.objects.create().pk Though I have explicitly told DRF that it should use all model's fields it does not seem to check for the requirement of fields like 'address' and whenever I create the serializer with data missing 'address' and call serializer.is_valid() it returns True. … -
post_list() missing 1 required positional argument: 'request'
I Have View.py class mainView(View): template_name = "search.html" def error_page(self,request): return render(request, 'error_page.html') def getQuery(self,query,): posts_list = Galeria.objects.filter( Q(nazwa__icontains=query) | Q(opis__icontains=query) ).distinct() return(posts_list) def postPagination(self,paginator,page): try: posts = paginator.page(page) except PageNotAnInteger: posts = paginator.page(1) except EmptyPage: posts = paginator.page(paginator.num_pages) return posts def post_list(self,request, category_slug=None, **kwargs): posts_list = Galeria.objects.all() query = request.GET.get('q') if query: posts_list = self.getQuery(query) ile = posts_list.count paginator = Paginator(posts_list, 10) # 10 posts per page page = request.GET.get('page') posts = self.postPagination(paginator, page) category = None categories = Category.objects.all() if category_slug: category = get_object_or_404(Category, slug=category_slug) categories_ile = Galeria.objects.values('category__name').annotate(count=Count('category__name')) context = { 'posts': posts, 'ile': ile, 'categories': categories, 'category': category, 'categories_ile': categories_ile} return render(request, "search.html", context) ... url.py urlpatterns = [ path('searchbar/', mainView.post_list, name="searchbar"), ... ] Why I get error "post_list() missing 1 required positional argument: 'request'"? I trying everything and I read documentation on this page https://docs.djangoproject.com/en/3.2/topics/class-based-views/intro/ and still nothing. -
Error in scheduled tasks: 'django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured.'
I deployed my Django app on pythonanuwhere and want to add one file to scheduled tasks. But it gives me an error: django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings. I tried this: os.environ.setdefault('DJANGO_SETTING_MODULE', 'smsreminder.settings') django.setup() Result the same, but error in the line with django.setup() Script in the file, which I want to execute: import datetime from django_common.auth_backends import User from reminder.models import Remind from twilio.base.exceptions import TwilioRestException from twilio.rest import Client def my_scheduled_job(): content = Remind.objects.all() account_sid = "--------------------------" auth_token = "--------------------------" for smscontent in content: if smscontent.remind_date == datetime.today().date(): tempusers = User.objects.filter(username=smscontent.author) for recipient in tempusers: try: client = Client(account_sid, auth_token) message = client.messages.create( body="I just want to remind, that you have some task for today {date}: {task}. {time} is the deadline!".format( date=str(smscontent.remind_date), task=str(smscontent.title), time=str(smscontent.remind_time)), to=str(recipient.username), from_="+18568889437") print(message.sid) except TwilioRestException: pass return Error: Traceback (most recent call last): File "/home/remindmy/sms-reminder/reminder/cron.py", line 3, in <module> from django_common.auth_backends import User File "/home/remindmy/.virtualenvs/remindervenv/lib/python3.9/site-packages/django_common/auth_backends.py", line 6, in <module> from django.contrib.auth.backends import ModelBackend File "/home/remindmy/.virtualenvs/remindervenv/lib/python3.9/site-packages/django/contrib/auth/backends.py", line 2, in <module> from django.contrib.auth.models import Permission File "/home/remindmy/.virtualenvs/remindervenv/lib/python3.9/site-packages/django/contrib/auth/models.py", line 3, in <module> from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager File "/home/remindmy/.virtualenvs/remindervenv/lib/python3.9/site-packages/django/contrib/auth/base_user.py", line … -
Django Carton, changing the cart.add() function so that I can add options for products
I'm creating a website that will have product that people can order. I decided to go with Carton as a shopping cart. I can see that the cart.add() function only takes the product, price and quantity. The products I have on the page allow for choices in colour, quality and a variable price. I got the variables into the view, but when adding into the: cart.add(product, price, quantity) I cannot add anymore arguments for the options: cart.add(product, price, quantity, options) when I do, I get an error saying there can only be 2-4 arguments. anyone who worked with this before, found a way to do it? Thanks in advance! -
Django JSONField: I cannot query using lookup
I have a Django model that has a postgreSQL JSONField, like this: class MyClass(models.Model): identifiers = JSONField(null=True, default=dict, blank=True) If I create a field like this: MyClass.objects.create( identifiers={ 'my_identifier': '12345' } ) and then query it like so: my_instance = MyClass.objects.first() print my_instance.my_identifier # prints '12345' it's there. But if I query it using lookups, like this: my_identifier = MyClass.objects.get(identifiers__my_identifier='12345') I get this error: FieldError: Unsupported lookup 'my_identifier' for JSONField or join on the field not permitted. There are other parts of this codebase (it's Python 2, we're just reeeaaly behind on porting to py3) where this logic seems to work. I cannot figure out what's going wrong. -
Django: How to Add Meta Tags to Multiple Pages?
Here is a link for a similar question: Django: How can I add meta tags for social media? This question only addresses how to add meta tags if there is only child class, now if there's multiple children that contain the {% block extra_head_tags %} <meta .../> {% endblock %} how would I implement this? Here is a sample structure: - Base UI.html (contains {% block extra_head_tags %}{% endblock %} ) - Child1.html(contains {% block extra_head_tags %} <meta CONTENT1/> {% endblock %} - Child2.html (contains {% block extra_head_tags %} <meta CONTENT2/> {% endblock %} -
Django validation of number from query string
Im having this code to create and add students to database. I need to make validation of count which must be integer, only positive, equal or less 100. Please help. def generate_students(request): count = request.GET.get('count') studentslist = [] for student in range(0, int(count)): student = Student.objects.create(first_name = fake.first_name(), last_name = fake.last_name(), age = random.randint(18,100)) studentslist.append(student) output = ', '.join( [f"id = {student.id} {student.first_name} {student.last_name}, age = {student.age};" for student in studentslist] ) return HttpResponse(str(output)) -
i need a particular geo library for django
I would like to show a map with pre-recorded positions in Django , the user will be able to choose one of the postions (pins) and we will get the point (coordinates or whatever) through a formMapfield. I know we can do this with geodjango but it would be overkill. Wouldn't there be a faster lib to set up even without spatial databases? thanks in advance -
How to validate my form,It's not validating
Am trying to update my record from frond-end and when I tried this one, My form is not validating. What is the solution for this problem or is there any other way to edit my record from front end models.py: class graphinput(models.Model): user=models.ForeignKey(User,on_delete=models.CASCADE) Month = models.CharField(max_length=30) Value1 = models.IntegerField(null=True,blank=True) Value2 = models.IntegerField() class Meta: db_table="WebApplication_graphinput" Views.py: def updatedisplay(request): userid = None if request.user.is_authenticated: userid = request.user.id print(userid) updatedisp=graphinput.objects.filter(user=userid).first() print(updatedisp) form=EditForms(request.POST,instance=updatedisp) if form.is_valid(): form.save() print('ADDED SUCCESFULLY') return render(request,"edit.html",{'displaymonthvalue':displaymonthvalue}) else: print("no such form") return redirect('display') forms.py: from django import forms from .models import graphinput class EditForms(forms.ModelForm): class Meta: model=graphinput fields= "__all__" -
Force DecimalField to convert a string into decimal - Django
I have this serializer: class Ticker24hSerializer(serializers.Serializer): change = serializers.DecimalField(max_digits=19, decimal_places=4) change_percent = serializers.FloatField() current = serializers.DecimalField(max_digits=19, decimal_places=4) high = serializers.DecimalField(max_digits=19, decimal_places=4) low = serializers.DecimalField(max_digits=19, decimal_places=4) def update(self, instance, validated_data): pass def create(self, validated_data): pass A dictionary contains decimal values like this: dict = { "change": "2128.5000", "change_percent": "5.632", "current": "39517.3141", "high": "40900.0000", "low": "37350.0000" } However, these values are stored as strings in the dictionary. When I serialize the dict: result = serializer(dict).data print(result) I get this: { "change": "2128.5000", "change_percent": 5.632, "current": "39517.3141", "high": "40900.0000", "low": "37350.0000" } DecimalFields are accepting strings, how can I make my serializer store decimals? -
How can I display my product variations separately in the shopping cart template? Issues writing my Django add_to_cart view
I will start off by saying I am very new to this and I am probably struggling because I did not get the basics right. So I am trying to build an online shop with Django with a few products and each of the products is meant to have 2-5 variations. I added the products (and variations) manually in the admin panel. I want the shopping bag table to display product variations separately such as: Product X - Variation 1 - Quantity 2 - Price: 20 Euro - Total: 40 Euro Product X - Variation 2 - Quantity 5 - Price: 30 Euro - Total: 150 Euro Product Y - ....... etc. This is my product model: class Meta: verbose_name_plural = 'Categories' name = models.CharField(max_length=254) friendly_name = models.CharField(max_length=254, null=True, blank=True) def __str__(self): return self.name def get_friendly_name(self): return self.friendly_name class Product(models.Model): category = models.ForeignKey('Category', null=True, blank=True, on_delete=models.SET_NULL) sku = models.CharField(max_length=254, null=True, blank=True) name = models.CharField(max_length=254) description = models.TextField() price = models.DecimalField(max_digits=6, decimal_places=2) rating = models.DecimalField(max_digits=6, decimal_places=2, null=True, blank=True) image_url = models.URLField(max_length=1024, null=True, blank=True) image = models.ImageField(null=True, blank=True) def __str__(self): return self.name class Variation(models.Model): image = models.ImageField(null=True, blank=True) name = models.CharField(max_length=120) price = models.DecimalField(max_digits=6, decimal_places=2, null=True, blank=True) active = models.BooleanField(default=True) product = … -
prepopulated_fields do not fire when imported into the database
I'm using prepopulated_fields prepopulated_fields = {'slug': ('name', 'mark_steel')} and it works in the admin panel when installed manually. But it doesn't work when bulk writing to the database. Is there any solution to fix this? -
Django how to make a button that first runs js function and then function in .py
I am building a Django app and on one of my HTML sheets, I button that should first run a js function(ocr()) and then another function in the .py. I've tried the first solution to this post. And now it runs the javascript function but it doesn't go on to the function in the .py. This is the js script: <div> <script> var ocr = function(event){ event.preventDefault(); Tesseract.recognize( document.getElementById('imgde').src, 'deu', { logger: m => console.log(m) } ).then(({ data: {text}}) => { console.log(text); document.getElementById('txt_voc_de').innerHTML = ['<input type="hidden" name="txt_voc_de" id="txt_voc_de" value="',text, '"/>'].join(''); }) Tesseract.recognize( document.getElementById('imgen').src, 'eng', { logger: m => console.log(m) } ).then(({ data: {text}}) => { console.log(text); document.getElementById('txt_voc_en').innerHTML = ['<input type="hidden" name="txt_voc_en" id="txt_voc_en" value="',text, '"/>'].join(''); }) }; var form = document.getElementById("imgForm"); form.addEventListener("submit", ocr, false); </script> <input type="submit" id="senden" class="inputfiles" /> <button for="senden" class="button" id="weiter_btn" >WEITER</button> {% csrf_token %} </div> -
Why is my form not getting saved in django?
I am trying to save the editted form in django but it is not working. The form is not even getting validated. I don't know what's wrong? Can someone please go through the code and tell me what is going wrong here? models.py: class DocComplaint(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True) event_date = models.DateField(null=True, blank=False) document = models.FileField(upload_to='static/documents', blank=False, null=True) def __str__(self): return str(self.event_date) views.py: (Adding this because I feel like it has something to do with this view as well) class EditComplaint(UpdateView): model = Complaint form_class = EditComplaintForm template_name = 'newcomplaint.html' def get_queryset(self, *args, **kwargs): return super().get_queryset(*args, **kwargs).filter( user=self.request.user ) def form_valid(self, form): if form.is_valid(): form.instance.author_id = self.request.user.pk print("Hello") return super().form_valid(form) def test_func(self): complain = self.get_object() if self.request.user == complain.user: return True raise Http404(_('This complain does not exist')) success_url = '/My-History/' class EditDocComplaint(UpdateView): model = DocComplaint form_class = EditDocComplaintForm template_name = 'newcheck.html' def get_queryset(self, *args, **kwargs): return super().get_queryset(*args, **kwargs).filter( user=self.request.user ) def form_valid(self, form): print("Hello") if form.is_valid(): form.instance.author_id = self.request.user.pk print("Hello") return super().form_valid(form) def test_func(self): complain = self.get_object() if self.request.user == complain.user: return True raise Http404(_('This complain does not exist')) success_url = '/My-Documents/' forms.py: class EditDocComplaintForm(ModelForm): class Meta: model = DocComplaint fields = ['event_date', 'document' ] widgets = { … -
How to save multiple forms on Django class based view
my case is as follows: The create view is conformed for multiple forms. All the following data is related to the parent model Form. Example: class PersonForm(forms.ModelForm): class Meta: model = Parent fields = ['Title', 'description'] class EducationForm(forms.ModelForm): class Meta: model = FirstChild fields = ['School', 'Year'] class CarForm(forms.ModelForm): class Meta: model = FirstChild fields = ['Model', 'Color'] [...] My view look as follow: class PersonInformationView(CreateView): model = Person form_class = PersonForm template_name = "example/person/create.html" def get_context_data(self, **kwargs): # Call the base implementation first to get a context context = super().get_context_data(**kwargs) context['PersonForm'] = PersonForm context['EducationForm'] = EducationForm context['CarForm'] = CarForm context['JobForm'] = JobForm context['HobbiesForm'] = HobbiesForm context['SocialMediaForm'] = SocialMediaForm return context The template look as follow: <form method="post">{% csrf_token %} <table style="width:100%"> {{ form.as_table }} <tr><td>EDUCATION</td></tr> {{ EducationForm.as_table }} <tr><td>CAR</td></tr> {{ CarForm.as_table }} <tr><td>JOB</td></tr> {{ JobForm.as_table }} <tr><td>HOBBIES</td></tr> {{ HobbiesForm.as_table }} <tr><td>SOCIAL MEDIA</td></tr> {{ SocialMediaForm.as_table }} </table> <div class="text-right"> <button type="submit" class="btn btn-primary">{% trans 'Send' %}</button> <a class="btn btn-danger" href="#" title="{% trans 'Cancel' %}">{% trans 'Cancel' %}</a> </div> </form> At the moment I don't know how to save the data to each child model. Whereas to each child model I must associate the id of the parent model and additional … -
AssertionError: 'RegisterApi' should either include a `serializer_class` attribute, or override the `get_serializer_class()` method
AssertionError at /api/auth/register I get this error 'RegisterApi' should either include a `serializer_class` attribute, or override the `get_serializer_class()` method. class RegisterApi(generics.GenericAPIView): serializer_class = RegisterSerializer def post(self, request, *args, **kwargs): serializer = self.get_serializer(data=request.data) serializer.is_valid(raise_exception=True) user = serializer.save() return Response({ "user": UserSerializer(user, context=self.get_serializer_context()).data, "token": AuthToken.objects.create(user)[1] }) -
Python/Django: How to make sure "string".upper and "string".lower work with different languages?
I have a problem with upper and lower functions in Python/Django. I have the following line of code: UserInfo.objects.get(id=user_id).city.upper() The problem is that some of the Turkish users let me know that they are seeing the wrong information. For example one of them is from a city called "izmir". The upper function converts that into "IZMIR" it turns out the actual result should be "İZMİR". What is the right way to use upper or lower functions for any given language? I read about changing the server locale as an answer. Changing server locale for each user request does not make sense to me. What about multi-threaded applications that handle different users simultaneously? Thanks in advance for your time.