pollo
Hi, i'm trying to connect Vue 3 js with the backend build it in django with DRF, and i have this problem
pollo
Access to fetch at 'https://s-install.avcdn.net/aos/assets/prod/translations/Locale-es-419.json' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Anonymous
What that meaning of ("^")
Anonymous
This is one of python operators
Doragonsureiyā
What that meaning of ("^")
Here there is the official Python tutorial, to help you learn Python step by step: https://docs.python.org/3/tutorial/index.html
user
How to use requests_html.HTMLSession.post(url, **kwargs) How the dictionary should send the data... What to use as the keys???
Sherry
How to stream a video file using python django
M
Hello, I have a database with a user and other tables, I need to register a user (via a form), can I connect to this form via a ForeignKey?
Rutherford
Hello, I have a database with a user and other tables, I need to register a user (via a form), can I connect to this form via a ForeignKey?
Use a modelfom and make the model represent the user. Then specify the fields you want to be filled.
マクスイム • グセブ
Hello, I have a database with a user and other tables, I need to register a user (via a form), can I connect to this form via a ForeignKey?
I highly recommend using UserCreationForm (from django​.​contrib​.​auth​.​forms​ ​import​ ​UserCreationForm) That's better than Rutherford 's method. Using this built-in form you still can modify fields or provide custom user model.
Hunde
i want to fetch database between some rows like from database table with many column i want to fetch 1-10 rows ,then 10-20 how can i do that
Hunde
How to retrieve partial rows in database
Брат
Hello guys! Im raising an error when I try to delete a Review, second one(Articles) is raising an error as 'matching query does not exist'
Брат
Review and Articles are models
William
Hello guys! Im raising an error when I try to delete a Review, second one(Articles) is raising an error as 'matching query does not exist'
It means there is no data with that primary key or other fields data that you are trying to filter.
Брат
I know but Im not trying to delete that model at all
Брат
Im trying another one, and while deleting I receiving that error. I can send you a stackoverflow link
Брат
https://stackoverflow.com/questions/68082995/doesnotexist-at-delete-4-employee-matching-query-does-not-exist
Брат
Similar with my case.
Брат
I wonder why the error says "Articles matching query does not exist" when I am deleting a Review?
ZRoman
Hi, tell me where celery stores the data that I pass to run_calculations.delay(task.data). I have a redis broker. I thought it was in the radish, but there are such keys: 127.0.0.1:6379> keys * 1) "celery-task-meta-9714be59-ecd2-4e28-b1c9-bb5a5e2190fb" 2) "_kombu.binding.celery" 3) "unacked_index" 4) "_kombu.binding.celery.pidbox" 5) "celery-task-meta-27e469bc-84f1-49f8-97b1-dfae8e2e65ed" 6) "unacked" the key does not contain this data: 127.0.0.1:6379> mget celery-task-meta-9714be59-ecd2-4e28-b1c9-bb5a5e2190fb 1) "{\" status \ ": \" SUCCESS \ ", \" result \ ": null, \" traceback \ ": null, \" children \ ": [], \" date_done \ ": \" 2021 -11-16T22: 00: 06.458846 \ ", \" task_id \ ": \" 9714be59-ecd2-4e28-b1c9-bb5a5e2190fb \ "}" if set to flower, the data is displayed.
Sergey
Hi all. How can I serialize data such as [{}]?
Sergey
Flag many=True doesn't help
William
I know but Im not trying to delete that model at all
In the query, Itself no data with that ID so why you are getting a No matching query error.
Sergey
data.values?
William
Like how we use .filter(), .order_by() same way use .values(). Try this but don't pass this query in serializer If you are using it.values()
Sergey
hmm you talking probably about ORM queries, when i asking about request objs
Jugurtha
Hi guys , what's best way to make search for specific fields in tables , any Library or anything. Thx in advance
Real
Hi all. How can I serialize data such as [{}]?
you mean like this? from django.core import serializers ... serializers.serialize("json", objInstance]) i use this method for convert my model instance to json
🤘
Hi guys , what's best way to make search for specific fields in tables , any Library or anything. Thx in advance
u can use Q also better way is to use "django full-text search" checkout link below there is a good example https://stackoverflow.com/questions/47377947/use-of-full-text-search-gin-in-a-view-django-1-11
Angry Uncle
Hello everyone! how can you make a query like this (SELECT p.name, pp.value as price FROM products_product p LEFT JOIN products_price pp on p.id = pp.product_id WHERE pp.price_type = 'Price 3') via django ORM?
....
hey.. get an error , when i trying to do download as a pdf file my page. for that i used the xhtml2pdf . the error is "InvalidURL at /download-pdf URL can't contain control characters. '/npm/bootstrap@5.1.3/dist/css/ /static/detail_resume.css ' (found at least ' ')" . when i comment the css in my template then i can download , no errors , but also there is a issue, i can't see my dynamic datas, only can see the hard coded data. how can i solve this ..?? anyone please
Vasilii
can I decompose celery task function to many functions? Like def bar(): do_something() def baz(): do_something() @app.task def foo(): bar() baz()
Moe (محمد)
Is there a way to dynamically update a dropdown value based on another dropdown value in the admin. I assume i would need to use ajax and overwrite the behaviour of the admin form, But could someone instruct me on how to do it?
Suleman
hi guyz! can anybody please provide me a good tutorial or resource integration bitpay payment gateway with django? Thanks
AFK
Can anyone help me regarding Use of META class and why its used inside in forms!! Thanks
Python
Hi, I have a django api that is works based on gpu, now how can I run or develop it with the cloud serices?
N
How can I pull the api of any Android website or application and display the data on my site? Can you explain a video?
AFK
Hi, I have a django api that is works based on gpu, now how can I run or develop it with the cloud serices?
Try AWS Its easy there Video suggested.. Deployment of django on Aws By Newton school
Doragonsureiyā
anyone plz help. out of this one
Maybe anyone is here, yes, but they are not obliged to read everyone's message here neither to reply to everyone's message, if someone wants to reply to your message, they will do that, just don't try to draw attention to your message writing "anyone?" every 5 minutes, that will lead you to be warned for SPAM/Flood, just be patient or use Google/DuckDuckGo to research about your question instead of wasting time here waiting for people to do your work. Have a nice day 😊
....
hey , guys. i want to create dynamic forms. meant by when i click a button "add new field" then want to add new field. also the field data wants to save in database . how can i do this . ? it's okay to use js for this. but how . ? is there any simple way . i know how to append new field with js . but in that case how is that saved in db . ?? anyone pls ?
ֆ33ʏ377
can i post job opening here?
Murshid
when adding log in production error occured.. no issue in local how to fix it
Murshid
Log
[Errno 13] Permission denied: '/home/passreader/apps/djangoproject/logs/staging.log
Charly
[Errno 13] Permission denied: '/home/passreader/apps/djangoproject/logs/staging.log
The error is clear, you don't have permissions to write the log
#!/bin/sh Inَactive
Can anyone help me regarding Use of META class and why its used inside in forms!! Thanks
when you create ModelForm you need Meta Class to add the configurations of the ModelForm
#!/bin/sh Inَactive
#!/bin/sh Inَactive
[Errno 13] Permission denied: '/home/passreader/apps/djangoproject/logs/staging.log
https://dev.to/courseprobe/how-to-set-chmod-777-to-a-folder-and-all-its-contents-acn
chaygo
Hi guys! Guys can you help me? I must do international payment in django with merchant. How can I do
chaygo
Where can I find information to learn?
Moe (محمد)
https://docs.djangoproject.com/en/3.2/ref/contrib/admin/ https://realpython.com/customize-django-admin-python/
Thats basic stuff for the admin, pretty much not answering my question but thanks
Delta
How do i get past this login error even with the right password
Shamsuddeen
I have no idea
Anonymous
Hi! If I create a website using Django and react js, still can I access the admin panel of django???
Breeze
Pls i want to integrate twilio api for phone OTP verification and email OTP verification into my django project. Any guide for me to do that?
Amir
Hello friends. Can you introduce a source on how to use CDN for static files ??
Mohd Zaid
Hello fiends
Mohd Zaid
hope u guys are doing well
Mohd Zaid
I had a question please help me out
Mohd Zaid
objects['pages'] = doc.pages_set.seletect_related().order_by('order')
Mohd Zaid
Mohd Zaid
please anyone help me
Eugene
can Anyone explain me the functionality of this line
But i can't see your structure ) doc is module or something else????
Mohd Zaid
pages is also a model instance
Eugene
pages is also a model instance
It's hard to say what you wanted when you're doing something like that
Mohd Zaid
Can i PM you ? cuz i cant share media in this folder