Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Where can I find and ID for Redis caching service running in a container?
im developing a rates service that retrieves rates from cache (Django, Redis), which has its own container. class CachedTraderRepository: def get_rate(self, pair): print("GET RATE START") print(pair) pair_rate = cache.get(pair) print(pair_rate) print("GET RATE END") return pair_rate def get_all_rates(self): print("GET ALL RATES START") all_rates = cache.get("all_pairs") print(all_rates) print("GET ALL RATES END") return all_rates I have a script that populates that cache with the data I need, and in the same script I made a method for retrieving same data and it works. Fills the cache, and when I do cache.get() I see the expected results. class CacheWorker: def fill_cache(self): print("START") pair_queryset = Pair.objects.all() pairs = [] print("retrieving pair queryset") for pair in pair_queryset: pairs.append(pair.name) print("pair list: ", pairs) all_rates = SandboxTraderSDK(account="martin").get_multiple_pair_response(pairs) print("rates: ", all_rates) cache.set("all_rates", all_rates) print("Cache filled") print("END") def get_cache(self): print("START") a = cache.get("all_rates") print(a) print("END") The problem is that I cannot see the same result when I execute it from the class: Shell: In [8]: CachedTraderRepository.get_all_rates() GET ALL RATES START None GET ALL RATES END So I think that django cache has 2 instances or sth like that, how can I print a Redis client ID or something like that to be sure if both codes are being executed on … -
'ascii' codec can't encode character '\u2013' when working with files in python (Django)
I have written a code that saves a certain image which was retrieved via an API with django etc... this module saves the retrieved image in some directory, and it works fine on some images but has an issue with others, also, this problem in happening in my actual live website and it does not occur in the localhost. the module is as follows: def save_poster(json_data): import os title = json_data['Title'] + ' ' + json_data['Year'] poster_url = json_data['Poster'] # Splits the poster url by '.' and picks up the last string as file extension poster_file_extension=poster_url.split('.')[-1] # Reads the image file from web poster_data = urllib.request.urlopen(poster_url).read() savelocation=os.getcwd()+'\\'+ 'Core' + '\\' + 'Posters'+'\\' # Creates new directory if the directory does not exist. Otherwise, just use the existing path. if not os.path.isdir(savelocation): os.mkdir(savelocation) filename=savelocation+str(title)+'.'+poster_file_extension f=open(filename,'wb') f.write(poster_data) f.close() return filename I get the following error when I try to use the API: UnicodeEncodeError at /api/film/film/create/ 'ascii' codec can't encode character '\u2013' in position 52: ordinal not in range(128) -
Django Conditional update based on Foreign key values / joined fields
I'm trying to do a conditional update based on the value of a field on a foreign key. Example: Model Kid: id, parent (a foreign key to Parent), has_rich_parent Model Parent: id, income So say I have a query set of A. I wanna update each item's has_guardian in A based on the value of age on the Kid's parent in one update. What I was trying to do is queryset_of_kids.update( has_rich_parent=Case( When(parent__income__gte=10, then=True) default=False ) ) But this is giving me an error Joined field references are not permitted in this query. Which I am understanding it as joined fields / pursuing the foreignkey relationships aren't allowed in updates. I'm wondering if there's any other way to accomplish the same thing, as in updating this queryset within one update call? My situation has a couple more fields that I'd like to verify instead of just income here so if I try to do filter then update, the number of calls will be linear to the number of arguments I'd like to filter/update. Thanks in advance! -
'name' in request.POST always returns False - django : python
I've a view, with two forms, i want to check which one will be submit, using 'bookingformbtn' in request.POST and 'visitorformbtn' in request.POST but both returns false ? here is my views def my_views_post(request): print('bookingformbtn' in request.POST)#returns False print('visitorformbtn' in request.POST)#returns False # non of these conditions works ! if request.method == 'POST' and request.is_ajax() and 'visitorformbtn' in request.POST: #do something elif request.is_ajax() and request.method == 'POST' and 'bookingformbtn' in request.POST: #do something else <form method="POST" class="mt-2" id="add_new_guestform">{% csrf_token %} <--! form inputs --> <input type="submit" name="visitorformbtn" value=" "save"> </form> <form method="POST" class="mt-2" id="post-form-add-booking">{% csrf_token %} <--! form inputs --> <input name="bookingformbtn" type="submit" value="save"> </form> is there something i did wrong please ?! thank you for your advice .. -
How to get sum of amount of distinct name
poi = booking_models.TestBooking.objects.filter(customer_visit=instance).values_list("package__package_name", "amount").order_by("package").distinct() Output of poi = [(None, 392.0), (None, 530.0), ('RahulNewPaackage', 3999.0), ('Suraj pkg today all', 699.0), ('suraj 44', 599.0)] So i want to get sum of these amounts. So sum will be 6219. I tried aggregate method but it does not work with order_by and without order_by distinct() does not work. So How to achieve this. Thank you !! -
How to list all items based on foreign key pk Django Rest Framework
i want to list all the instanced that are saved to a certain Animal. Let's say a dog has id 3 and i have got 2 instances of dog sexes but when i get the request from animal/3/sex i only get one instance not 2. I tried using many=True to serializers.PrimaryKeyRelatedField but it shows me that 'Animal is not iterable'. Do you have any idea how to do it? class AnimalSex(models.Model): name = models.CharField(max_length=256) slug = models.SlugField(max_length=128, unique=True, null=False, editable=False) created_at = models.DateTimeField(editable=False, default=timezone.now) updated_at = models.DateTimeField(default=timezone.now) animal = models.ForeignKey(Animal, on_delete=models.CASCADE, null=False) VIEWS class MyAnimalSex(generics.RetrieveAPIView): queryset = AnimalSex.objects.all() serializer_class = AnimalSexSerializer lookup_field = 'pk' SERIALIZER class AnimalSexSerializer(serializers.ModelSerializer): animal = serializers.PrimaryKeyRelatedField(read_only=True) class Meta: model = AnimalSex fields = ('name', 'slug', 'animal',) URL path('animal/<int:pk>/sex', MyAnimalSex.as_view()), -
How can I loop through dynamic URLs in Django 4?
The problem: I recently published a site on Python Anywhere and had to go through the tedious process of changing all of the page URLs I had set through my SQLite database. All of the URLs were broken since the root had changed from the local port to "username.pythonanywhere.com". I had no problem doing this, but I realized that in order to do local development I would need to change the URLs in the database back to their local port paths. This is obviously why we use dynamic URLs. However, the URLs that were hard coded were like that because I was using a for loop on the rendered html page to loop through those static URLs in my database. My question is, how can I use dynamic URLs {% url app:template %} in a for loop? Ideally, I would like to have a field in my database that contains the app:template information such that I can loop through all the projects in my database and link them dynamically by grabbing the info from that field. I have tried creating a new CharField in models.py with a string value for {% url app:template %}, hoping that it would work with … -
Is there a a function to implement when dealing with django image or filefield?
I create a filed which contain Imagefield in my models but when I am trying to add the image to the to the field in my admin page it is telling me function not implemented This is how my models look like from django.db import models # Create your models here. class Image(models.Model): name = models.CharField(max_length = 40) img = models.ImageField(upload_to = 'images/') def __str__(self): return self.name This is the exception that gives me OSError at /admin/imageapp/image/add/[Errno 38] Function not implementedRequest Method:POSTRequest. URL:http://127.0.0.1:8000/admin/imageapp/image/add/ Django. Version:3.2.11 Exception Type:OSError Exception Value:[Errno 38] Function not implementedException. Location:/data/data/com.termux/files/ home/imagetest/lib/python3.10/site- packages/django/core/files/locks.py, line 117, in unlockPython. Executable:/data/data/com.termux/ files/home/imagetest/bin/ pythonPython Version:3.10.2Python Path: ['/storage/emulated/0/imagetest', '/data/data/com.termux/files/usr/lib/python310.zip', '/data/data/com.termux/files/usr/lib/python3.10', '/data/data/com.termux/files/usr/lib/python3.10/lib- dynload', '/data/data/com.termux/files/home/ imagetest/lib/python3.10/site-packages'] Server time:Fri, 21 Jan 2022 16:13:45 +0000 -
Hello everyone, please tell me how to implement the POST / search method, which returns data from a Json file with a delay of 60 seconds, for example [closed]
POST / search method, which returns data from a Json file with a delay of 60 seconds, for example -
Django URL dispatcher and lists?
I'm unsure if the title terminology makes much sense. But I have a pretty loose grasp on the URL dispatcher and if what I'm really asking here is in regards to the dispatcher or not really. Here is my views file: def current_game_table(request): items = list(Nbav8.objects.using('totals').all()) # rest of your code return render(request, 'home/testing.html', {'items': items}) def your_details_view(request, pk): item = Nbav8.objects.using('totals').get(pk=pk) current_day_home_team = list(Nbav8.objects.using('totals').values_list('home_team_field', flat=True)) current_day_away_team = list(Nbav8.objects.using('totals').values_list('away_team_field', flat=True)) awayuyu = [] homeuyu = [] for team in current_day_home_team: home_team_list1 = PreviousLossesNbav1WithDateAgg.objects.using('totals').filter(Q(away_team_field=team) | Q(home_team_field=team)).values_list('actual_over_under_result_field', flat=True) homeuyu.append(list(home_team_list1[:5])) home_team_list2 = homeuyu typeitem = type(item) typehome = type(current_day_home_team) for team in current_day_away_team: away_team_list1 = PreviousLossesNbav1WithDateAgg.objects.using('totals').filter(Q(away_team_field=team) | Q(home_team_field=team)).values_list('actual_over_under_result_field', flat=True) away_teamdd = away_team_list1[:5] awayuyu.append(list(away_team_list1[:5])) away_team_list2 = awayuyu return render(request, 'home/testing2.html', {'item': item, 'away': away_team_list2, 'home': home_team_list2, 'type1': typeitem, 'type2': typehome, 'eep': current_day_home_team}) Here is my testing.html Hello World {{ items }} {% for item in items %} <a href="{% url 'your_details_view' item.pk %}">{{ item.home_team_field }}</a> {% endfor %} Here is testing2.html <p>The price of this item is: {{ item }}</p> <p>The price of this item is: {{ home }}</p> <p>The price of this item is: {{ away }}</p> {{ eep }} <a href="{% url 'your_details_view' item.pk %}">{{ away }}</a> And here is my url … -
Django get current Model ID
Good Day, I have a delete btn for each created Title. When you click on the delete button, the model will be delete with the url localhost:8000/delete/OBJECT_ID models.py class NewTitle(models.Model): user = models.ForeignKey( settings.AUTH_USER_MODEL, default=None, null=True, on_delete=models.CASCADE, ) title = models.CharField(max_length=200) creator_adress = models.GenericIPAddressField(null=True) id = models.BigAutoField(primary_key=True) def __str__(self): return str(self.title) views.py def title_view(request): custom_title_id = random.randint(1111, 1111111111111) titles = # What to here, maybe NewTitle.pk? if request.method == 'POST': form = NewTitleForm(request.POST, instance=NewTitle(user=request.user)) if form.is_valid(): obj = form.save(commit=False) obj.creator_adress = get_client_ip(request) obj.id = custom_title_id while NewTitle.objects.filter(id=obj.id).exists(): obj.id = random.randint(111, 11111111111) obj.save() return redirect('/another') else: form = NewTitleForm() return render(request, 'test.html', {'form': form, 'titles': titles}) def title_delete(request, title_id): user_title = NewTitle.objects.filter(id=title_id, user=request.user) if user_title: user_title.delete() else: return redirect('https://example.com') return HttpResponseRedirect('/another') test.html {% for i in request.user.newtitle_set.all %} <p> {% if i.user == request.user %} {{ i.title }} {% endif %} <form action="delete/ #THE CURRENT OBJECT ID" method="POST">{% csrf_token %}<button type="submit">Delete Title</button></form> </p> {% endfor %} Every 'Title' is displayed in the template. Next to each title there is a Delete button that leads to delete/OBJECT_ID. How can I set the action="" to the correct delete URL. So that I get the current ID of the title (object). The interesting part … -
Why this Django Rest Framework simple serializer don't work with ViewSet?
I have to endpoints with Django REST: ProductViewSet and DeviceViewSet. They are as simple as a GET method with retrieve and list. While I was profiling, I did a bit of research and I decided to write my own very simple serializers (not from DRF) and the performance is highly improved. The ProductViewSet works perfectly for retrieve and list methods. The DeviceViewSet works for list but fails for retrieve because of the serializer. This is the error: Traceback (most recent call last): File "/home/everton/.virtualenvs/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/home/everton/.virtualenvs/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 145, in _get_response response = self.process_exception_by_middleware(e, request) File "/home/everton/.virtualenvs/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 143, in _get_response response = response.render() File "/home/everton/.virtualenvs/venv/lib/python3.8/site-packages/django/template/response.py", line 106, in render self.content = self.rendered_content File "/home/everton/.virtualenvs/venv/lib/python3.8/site-packages/rest_framework/response.py", line 70, in rendered_content ret = renderer.render(self.data, accepted_media_type, context) File "/home/everton/.virtualenvs/venv/lib/python3.8/site-packages/rest_framework/renderers.py", line 723, in render context = self.get_context(data, accepted_media_type, renderer_context) File "/home/everton/.virtualenvs/venv/lib/python3.8/site-packages/rest_framework/renderers.py", line 655, in get_context raw_data_put_form = self.get_raw_data_form(data, view, 'PUT', request) File "/home/everton/.virtualenvs/venv/lib/python3.8/site-packages/rest_framework/renderers.py", line 551, in get_raw_data_form serializer = view.get_serializer(instance=instance) File "/home/everton/Documents/django/django_app/userapi/views.py", line 293, in get_serializer return self.serializer_class(*args, **kwargs) TypeError: __init__() got an unexpected keyword argument 'instance' Everything is nearly identical excel the DeviceSerializer uses the ProductSerializer because of a ForeignKey field. I can't seem to find the … -
How to loop my django template from my dynamic forms
I got Forms.py something like this, I make dynamic for HomeTeam until LigaTeam. class CreateEvents(forms.Form): def __init__(self,*args,**kwargs): choices = kwargs.pop('choices') team = kwargs.pop('team') choicesAgent = [("%s" % x['_id'], "%s" % x['name']+" by: "+x['agentName']) for x in choices] teams = [("%s" % x['_id'], "%s" % x['name']) for x in team] super(CreateEvents,self).__init__(*args,**kwargs) self.fields['agent'].choices = choicesAgent # List Match Make Dynamic for i in range(0, 6): self.fields["homeTeam%d" % i] = forms.ChoiceField(label="Home Team %d" % i+1, widget=forms.Select(attrs={'class': "form-control"}), required=True) self.fields["homeTeam%d" % i].choices = teams self.fields["awayTeam%d" % i] = forms.ChoiceField(label="Home Away %d" % i+1, widget=forms.Select(attrs={'class': "form-control"}), required=True) self.fields["awayTeam%d" % i].choices = teams self.fields["matchDate%d" % i] = forms.DateField(label="Match Date %d" % i+1, initial=DateNow(4), widget=forms.TextInput(attrs={'placeholder': 'Input Match Date %d' % i+1,'class': "form-control"}), required=True) self.fields["matchTime%d" % i] = forms.TimeField(label="Match Time %d" % i+1, initial=TimeNow(), widget=forms.TextInput(attrs={'placeholder': 'Input Match Time %d' % i+1,'class': "form-control"}), required=True) self.fields["ligaName%d" % i] = forms.CharField(label="League Name %d" % i+1, max_length = 30, widget=forms.TextInput(attrs={'placeholder': 'Input League Name %d' % i+1,'class': "form-control"}), required=True) # Event Detail agent = forms.ChoiceField(label="Agent", widget=forms.Select(attrs={'class': "form-control"}), required=True) eventName = forms.CharField(label="Event Name", max_length = 30, widget=forms.TextInput(attrs={'placeholder': 'Input Event Name','class': "form-control"}), required=True) startDate = forms.DateField(label="Start Date", initial=DateNow(), widget=forms.TextInput(attrs={'placeholder': 'Input Start Date','class': "form-control"}), required=True) deadlineDate = forms.DateField(label="Deadline Date", initial=DateNow(4), widget=forms.TextInput(attrs={'placeholder': 'Input Deadline Date','class': "form-control"}), required=True) … -
Agrupar registros con suma [closed]
Necesito traer los registros de mi base de datos agrupados por un campo y sumando dos campos. actualmente tengo este código results = programacion.objects.filter(Q(codigo_recurso__recurso__icontains=recurso)).values('pk', 'programacion', 'codigo_hijo', 'turno_inicio', 'proyecto', 'pedido', 'orden_produccion','actual_start_time', 'actual_end_time', 'descripcion_hijo', 'rendimiento', 'cantidad_inicial', 'descripcion_orden_produccion', 'estado_job' ).order_by('orden_produccion') results = results.annotate(tiempo_un(60/Sum('rendimiento'))*Sum('cantidad_inicial')) Pero me todos los registros y no me agrupa por orden_produccion -
how I set path of different folder path other than static folder to download files in Django
how I set path of different folder other than static folder to download files in Django My files are created at the server where the mange.py file is placed.Each time file is changed according to user requirement I'm new to django help me . myproject -manage.py -myfile.aln myproject -setting.py -Urls.py myprojectApp -template -static -url.py -views.py Now I just want to download myfile.aln file that s in myproject folder .... now in template page how I set this folder path -
Problems changing the prefix of a formset in django
I have a question, what happens is that I have a formset and an empty_form (in the same HTML); I have them to do some calculations, for the empty_form I already managed to extract the ID and do operations but not for the formset, and that is that my main problem is that they have the different ID, for example for the formset is like this: id_form-0-quantity and for the empty_form it is: id__form-1-quantity (one more underscore) but with that different ID I have to make some changes in JS, which I don't want to do because I'm very new in JS and possibly messing up the code more. Is there a way to change the formset prefix to look like this: id__form-0-quantity?; I used the following line: formset = ParteFormSet(request.POST, request.FILES, prefix='__form') But absolutely nothing happens views def create_Presupuestos(request): extra_forms = 1 ParteFormSet = formset_factory(PresupuestosParteForm, extra=extra_forms, max_num=20) presupuestosclientesform=PresupuestosClientesForm(request.POST or None) presupuestosvehiculosform=PresupuestosVehiculosForm(request.POST or None) presupuestosparteform=PresupuestosParteForm(request.POST or None) presupuestosmanoobraform=PresupuestosManoObraForm(request.POST or None) presupuestospagosform=PresupuestosPagosForm(request.POST or None) if request.method == 'POST': formset = ParteFormSet(request.POST, request.FILES, prefix='__form') if formset.is_valid(): presupuestosclientesform.save() return redirect('presupuestos:index') else: formset = ParteFormSet() return render(request,'Presupuestos/new-customer.html',{'presupuestosclientesform':presupuestosclientesform,'presupuestosvehiculosform':presupuestosvehiculosform,'presupuestosparteform':presupuestosparteform,'presupuestosmanoobraform':presupuestosmanoobraform,'presupuestospagosform':presupuestospagosform,'formset':formset}) HTML <table class="table table-bordered table-nowrap align-middle" id="childTable1"> <thead class="table-info"> <tr> <th scope="col">Quantity</th> <th scope="col">Unit Price</th> </thead> <tbody> … -
How do you send a custom attribute to the Django admin site context?
I would like to send a custom attribute (True or Flalse) to the Django admin website so that it can be access in a custom template as such: {{ model.highlight_background }} {% if model.highlight_background %} Right now I have a method of doing this which feels incredibly hacky: I'm overriding the admin.AdminSite._build_app_dict to put 'highlight_background': model._meta.permissions, into model_dict and then adding permissions = (('highlight_background', 'Highlight Background'),) to the Meta class of the model I want this to occur on, and then calling using model.highlight_background.0.0 in the template. This "works", in that I am able to do exactly what I want with this information, but it doesn't seem like the "correct" way of doing it. What I would like to know is if there is a better way of going about doing this, preferably without overriding anything other than the admin site templates, or overriding as little as possible. I have since started going down the rabbit hole of overriding the django.db.models.options.Options.__init__ to add self.highlight_background = False and just directly utilize highlight_background = True in the Meta class, but I thought I had better ask if there is a proper way of going about this before I spend too much time … -
Dynamic Url Routing In Django not working
The page works fine without url routing but says page not found on url routing views.py urls.py post.html -
Virtual Environment: Django's db -> CommandError: You appear not to have the 'sqlite3' program installed or on your path
I'm looking for the solution to how can I run manage.py dbshell in a virtual environment without error: CommandError: You appear not to have the 'sqlite3' program installed or on your path. I have installed Python in venv. I added the path to environment variables. I can populate db in the Django project, so it's not a case of not working MySQL. Answers for similar questions somehow doesn't work in my case. Windows 10, python 3.x -
Filter by CharField pretending it is DateField in Django ORM/mySql
I am working with a already-done mySQL Database using Django ORM and I need to filter rows by date - if it wasn't that dates are not in Date type but normal Varchar(20) stored as dd/mm/yyyy hh:mm(:ss). With a free query I would transform the field into date and I would use > and < operators to filter the results but before doing this I was wondering whether Django ORM provides a more elegant way to do so without writing raw SQL queries. I look forward to any suggestion. Thank you. -
Django: Avoid race condition duplicates objects in complex relationship
I have two models, Company and Customer, that are related through an intermediate table, Contact. There should never be more than one Contact object that relates a Company object to a Customer object. The complexity is that the Company-Customer relationship is not a normal ManyToMany. Company and Contact are related with a ForeignKey, but Customer and Contact are related through a ManyToMany. Here are the simplified models. class Company(Model): # Unrelated fields class Customer(Model): # Unrelated fields class Contact(Model): company = ForeignKey(Company, related_name="contact") customer = ManyToMany(Customer, related_name="contact") # Unrelated fields When Customer data comes in related to a Company, I create a Customer or find an existing Customer with matching data. Then I create a Contact to link the Customer to the Company. This is the code I've been using to check whether a Contact already exists linking the Company and Customer: try: contact = customer.contact.get(company=company) except Contact.DoesNotExist: contact = customer.contact.create(company=company) But this allows for the occasional creation of duplicate Contacts due to race conditions. Using Django's built in get_or_create doesn't work here because of the M2M relationship between Customer and Contact. How can I enforce Contacts being unique connections between Companies and Customers while avoiding this race condition? --In … -
Log files isn't writable
I'm create a website based on Django with Docker. I've a problem whit the management of log files of Gunicorn. With the script below the site runs without problems: #!/usr/bin/env bash cd personal_website exec gunicorn personal_website.wsgi:application \ --name personal_website \ --bind 0.0.0.0:"${PROJECT_PORT}" \ --workers 3 \ "$@" Here what I see on terminal: dev_website | [2022-01-21 16:36:17 +0000] [1] [INFO] Starting gunicorn 20.1.0 dev_website | [2022-01-21 16:36:17 +0000] [1] [DEBUG] Arbiter booted dev_website | [2022-01-21 16:36:17 +0000] [1] [INFO] Listening at: http://0.0.0.0:8301 (1) dev_website | [2022-01-21 16:36:17 +0000] [1] [INFO] Using worker: sync dev_website | [2022-01-21 16:36:17 +0000] [11] [INFO] Booting worker with pid: 11 dev_website | [2022-01-21 16:36:17 +0000] [12] [INFO] Booting worker with pid: 12 dev_website | [2022-01-21 16:36:17 +0000] [13] [INFO] Booting worker with pid: 13 dev_website | [2022-01-21 16:36:17 +0000] [1] [DEBUG] 3 workers But when I add the logging files: #!/usr/bin/env bash # Prepare log files and start outputting logs to stdout touch ./logs/gunicorn.log touch ./logs/gunicorn-access.log cd personal_website exec gunicorn personal_website.wsgi:application \ --name personal_website \ --bind 0.0.0.0:"${PROJECT_PORT}" \ --workers 3 \ --log-level=debug \ --error-logfile=./logs/gunicorn.log \ --access-logfile=./logs/gunicorn-access.log \ "$@" I see the error below: dev_website | Error: Error: './logs/gunicorn.log' isn't writable [FileNotFoundError(2, 'No such file or … -
Getting user data from token in reactjs? Django Rest API
Can someone help me understand what I need to do to login users into my website and use their information throughout my react js program? I have watched all the videos I could find on django authentication and the majority of them end with you dealing with the user's access token, but where do you get their database stored information? I don't have it all setup correctly anymore but before I had it where whenever a user registered / login it creates the access token but where do I get information such as the current users name (things stored in the database)? So for example: In the Navbar I could have your username, image, etc. Would I have to pass these things back through a prop to app.js when you login? I think I saw and tried a get by token function, but I don't think it worked. I was using the default SQL Django comes with but I plan on / started using postgres after following a tutorial but I am not opposed to using anything. At this point I am trying to start over completely, but I can't find any tutorials that show what I am looking for … -
Is there a a function to implement when dealing with django image or filefield? Please help me out [closed]
This is the error that I am getting Os error function not implemented -
Django AgoraRTC
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'play') at joinAndDisplayLocalStream DevTools failed to load source map: Could not load content for http://127.0.0.1:8000/static/assets/AgoraRTC_N-production.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE