V̷a̷h̷r̷a̷ m̷
Hello everyone, i want to add custom storages in AWS S3, but when i try to import storages.backends.s3boto3 i get a error << ModuleNotFoundError: No module named 'storages' >>, but i configure it in INSTALLED_APPS [ "storages", ... ] . I also try to install django-storages and boto3 out of vertual enviroment and surprisingly it works, but when i delete it from global packages it again not works. what should I do?😑🤔
Arildo
Hey guys, good evening, could anyone tell me if there's a way to upload files to django in a format other than TemporaryUploadedFile? I say this because I try to send files from the front to my function in django via a request in a formdata, and they arrive as TemporaryUploadFiles, which is causing me problems, I accept any kind of suggestion. Thanks!
Arildo
Why is causing an issue? Explain that
I need to send these files to a thread that will process them and eventually check if they have already been processed (I do this because the time to process can be high, which would generate time out). But when I send the files to the thread when the original function returns its response, the files are deleted (they are in closed status) and I can no longer process these files.
Arildo
But if you hear of any way to create a copy of these files or something like that, that would also solve the problem
Hamza
I am write to a file and save it into my database How can save it into a specific folder in my project
Hamza
model.FileField, then specify an upload_to parameter
Ok , but in my case I am creating a folder and write on it (in function in views.py) When the folder created , it was stored in project folder directly But I want to store it in specific folder
Erkaboy
Anyone please help....
Can you share your code?
Mohammed
Can you share your code?
Sure. Can i PM you. Actually there are some screenshots of my models, views, html etc.
Nasir Ahmad
How to decompress a zip file in Django
Charly
How to decompress a zip file in Django
Search in Google how to do it with simple python, you can use it in Django
Alejandro Alomia
Hi all I have a problem with a django application I am creating, I am using CreateView to create an entry in the database but when I pass UserPassesTestMixin as argument to the view so that only users who created the topic can add entries I get an error any solution for this?
Michael
Hi, how i can serialize models with subclass meta?
Mohammed
class MySerializer(serializers.ModelSerializer): class Meta: model = MyModel This should work
Wan
e.py", line 383, in check_constraints raise IntegrityError( django.db.utils.IntegrityError: The row in table 'adminku_datapaket' with primary key '1' has an invalid foreign key: adminku_datapaket.namapaket_id contains a value 'namapaket_id' that does not have a corresponding value in adminku_paket.id.
Forrest
Good Morning How can I autocomplete form fields? Example I select the name of a student and fill in the address and telephone fields
Ôscar
Why after updating my blog and adding new posts , heroku delete them
Charly
Why after updating my blog and adding new posts , heroku delete them
Because heroku does not offer persistence you need to use an external database
Ôscar
I already use sqllite3
Ôscar
You mean i need to host it online ?
Charly
I already use sqllite3
Thats not an external database, heroku deletes the filesystem on each run
Ôscar
So basically heroku only hosts static web apss if i don't host my db online
Ai
I want to develop an music player app as my academic project... Anyone pls share any reference for it
Doragonsureiyā
Hamza
Hi What is the difference between Access,token , refresh In simple_jwt
Pk
Use github
Hamouda
Hello, can you PLEASE explain to me the usage of OuterRef
Hamouda
i read the docs and i dont seem to get it
Michael
guys, send plz roadman for learn django
talha
how can I change id of a model in shell (django 4.1) what I tried Question.objects.get(id=3).update(id=1) but I know I did it wrong and also got traceback
Daniel
guys, send plz roadman for learn django
https://gist.github.com/shahwan42/279f6ec17dfc91ec9c6f778ae2877b2d
Hello
Hey! I've a question.. I try to connect between two tables by manytomany field .. and get an error , who knows why ?
Hello
https://dpaste.org/huCPw
Hello
that's the code on models.py
Hello
django.db.utils.OperationalError: foreign key mismatch - "products_favoritelist_favorite_product" referencing "products_product"
Smoke
i have implemented a standard chat socket on django channels, i have a question, how can i get the data from the database?
Smoke
i need: receive post request. and display it with web socket on (chat='first',room='123')
M
http://piriecommerce.pythonanywhere.com Guys why 2 of my endpoints work but others don't? :////
Doragonsureiyā
http://piriecommerce.pythonanywhere.com Guys why 2 of my endpoints work but others don't? :////
Read this please: http://catb.org/~esr/faqs/smart-questions.html#intro
M
http://piriecommerce.pythonanywhere.com Guys why 2 of my endpoints work but others don't? :////
I get an <<maximum recursion depth>> error. Everything works on local
Rojitech
http://piriecommerce.pythonanywhere.com Guys why 2 of my endpoints work but others don't? :////
Have you tested it in development when DEBUG is false and when DEBUG is true
Doragonsureiyā
Can i send error's image in your PV?
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Asadbey
In my django project, I am trying to use celery and rabbitmq , problem here celery receiving task but not executing, how can I solve this (on windows)
Shilpy
Hello guys. I want to know one thing. The response of an API is dictionary. Can we implement pagination on it?
Shilpy
Yup, it's quite simple
How come? In the document it was mentioned that the paginator object takes list/tuple/queryset
Shilpy
Documentation*
Vaibhav
How come? In the document it was mentioned that the paginator object takes list/tuple/queryset
Ideally it is always a list, else we won't be having a pagination
Shilpy
What kind of data you were looking to paginate
It's in nested dictionary format
Shilpy
Not a list
Vaibhav
It's in nested dictionary format
Can you share? And also what you are thinking to paginate in it
Shilpy
Ok
Grace
I am trying to generate an otp using email, timestamp and the pk using the python six module, however the token is too long whereas i wanted a 6 digits token. I need you to suggest to me how i can generate a 6 digits token.
Fife
Why not just use python random function, and probably store it in a variable so you do whatever you want with it🤷🏾‍♂
I did something like that to generate an account number for newly registered users on one of my projects
Grace
Hey guys, i managed to solve it i used the pyotp module and it was awesome, thanks for the help
.
Hey wanna devlop ecommerce with pos.. Binary tree business plan.. Anyone has idea how to proceed. 🙏
Alek
Hi could you please advice on this celery question? I want to use two celery queues https://stackoverflow.com/questions/73599958/celery-worker-is-not-starting
D
Guys
D
Is it possible to build chat app using channels and web sockets with drf