Arunkumar
I'm creating a django exam quiz project I need a timer in my project to show how much time a students take to complete their exam, Is there any prebuilt models or modules available
Modibo Sangaré
Sa
♈
Hi, MoneyUser my cutsom user And staff, customer, agent, admin another model -------------------/----------------------------- create moneyuser in agent user, after how to automatically add in agent model???? ------------------------------------------------- MoneyUser is main abstract user Anybody have good suggestion help Can i performe this task in signal pre_save??
Anonymous
Hello, this create method in serializer.py; unable post got error "choices = validated_data.pop('newspaper_of') KeyError: 'newspaper_of' " can you give the solution for this thanks
coder
?
write a python program function that takes an integer 'n' as input and calculate the value of following series: 1!+2!+3!+.....n!
please help me to solve this program
Anonymous
write a python program function that takes an integer 'n' as input and calculate the value of following series: 1!+2!+3!+.....n!
print(sum(map(lambda x : fact(x), range(1, n+1)))) Here n is the input taken And write a fact(x) function which return a factorial of number x,
Bwaks
Hey how can i modify this code------->return Artist.objects.all().order_by('-created_date')[:5]<------>at a column (view_count) that stores number of visits i want it to get 5 objects and in the 5 objects get the ones with most views please help
Sourabh
ImportError : Cannot import name 'FieldDoesNoyExist' from django.db.models.fields (c:python\lib\siye-package\django\db\models\fields\__init__.py
Anonymous
How to resolve this error?
It should be FieldDoesNo T
Sherlock
suppose i create a model based, api which return name, age, gender simple api. then what is microservice here..🙏🙏
Sourabh
It should be FieldDoesNo T
Ya i did spell mistake here while writing
Sourabh
It should be FieldDoesNo T
But how to resolve that error?
.
Hi, what is the most secure database I can use with django?
Ash
Django full-text search on multiple related fields returning duplicate data https://www.reddit.com/r/django/comments/osqn0y/django_fulltext_search_on_multiple_related_fields/?utm_medium=android_app&utm_source=share
Ash
Django full-text search on multiple related fields returning duplicate data https://www.reddit.com/r/django/comments/osqn0y/django_fulltext_search_on_multiple_related_fields/?utm_medium=android_app&utm_source=share
Hi everyone, I'm facing an issue where if I use full text search on realted field is returning multiple same objects. Any help would be highly appreciated. More is explained in the post.
Vasilii
how to send form in DRF api test?
Karthick
I upload one file in admin page using form
Karthick
Now I want to get full path of the file
Вин Король Саксов
Add icon to your website if you need
Вин Король Саксов
This error shows because you don't have your website icon, just ignore it
Vasilii
I'm getting error on testing api automatically, but in postman all is ok. Traceback: https://pastebin.com/SHh4z6Fh, views.py: https://pastebin.com/dUiF4bWK, test_views.py - https://pastebin.com/420Rsdme
Ben
Once agian, I want to add a py file to my django project which calculate the requested data before saving it to DB. Should I worry about conflicting as many users send requests at the same time?
Вин Король Саксов
Once agian, I want to add a py file to my django project which calculate the requested data before saving it to DB. Should I worry about conflicting as many users send requests at the same time?
If you need to do heavy calculations use celery, its async. Django itself is sync, and it can compute only one request in a thread.
Ben
If you need to do heavy calculations use celery, its async. Django itself is sync, and it can compute only one request in a thread.
Django supports async, and from what I got from documentation, I should use ASGI which doesn’t allow long-running request. is this gonna be an issue? And where should I use Celery, wsgi/sync?
Anonymous
beckand request is coming. How can I get the login and password that the user enters from the reques and send it into the data
Aryan
Can anyone help me in django
Doragonsureiyā
Can anyone help me in django
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Aryan
Kk
Вин Король Саксов
Django supports async, and from what I got from documentation, I should use ASGI which doesn’t allow long-running request. is this gonna be an issue? And where should I use Celery, wsgi/sync?
Django asgi support is very poor, it barely supports 20% of Django, for async django you should use gunicorn with async workers + nginx, and monkey patch to make django app fully async
Вин Король Саксов
Django supports async, and from what I got from documentation, I should use ASGI which doesn’t allow long-running request. is this gonna be an issue? And where should I use Celery, wsgi/sync?
And you should use celery for background tasks, like sending email, calculating something that will take a lot of time. And also you can make scheduled tasks with it
Firdavs
I add custom field to usercreationform in forms.py but it doesnt see in the admin why
♈
Hi, MoneyUser my cutsom user And staff, customer, agent, admin another model -------------------/----------------------------- create moneyuser in agent user, after how to automatically add in agent model???? ------------------------------------------------- MoneyUser is main abstract user Anybody have good suggestion help Can i performe this task in signal pre_save??
Monde
hey guys, I have an challenge that I have been trying to sovle for nearly 2 months with no prevail, I've asked on stackoverflow, digital ocean and linode but I havent gotten satifactory results, I am trying to deploy my django app but everytime I configure my gunicorn.service conf file it says the directory to my guincorn file does not exist, does anyone have a plausable solution to this ?
Safa
ne zaman gelirsiniz
Sherlock
if the api send/receive json data then how imgaes/file get passed ? 🙏
Sherlock
Show an example to get you clearly
i am just learning things like api, say if facebook has private api for photos uploaded like how's that possible if api sends json data which i think(again i'm noob) is text
Light
Which parameter between data / json / files you need to use depends on a request header named Content-Type (you can check this through the developer tools of your browser). When the Content-Type is application/x-www-form-urlencoded, use data=: requests.post(url, data=json_obj) When the Content-Type is application/json, you can either just use json= or use data= and set the Content-Type yourself: requests.post(url, json=json_obj) requests.post(url, data=jsonstr, headers={"Content-Type":"application/json"}) When the Content-Type is multipart/form-data, it's used to upload files, so use files=: requests.post(url, files=xxxx)
Alikhanov Jakhongir
Hi, I wanna make real time Android Application with Django Channels Rest Framework, But I am not sure it is gonna work or not. Can you guys tell me if it is possible to use Django Channels Rest Framework with Fultter/Dart application? or some solutions to reach the destination. thank you all.
Monde
Show us codes
Okay just a sec
Monde
[Unit] Description=gunicorn daemon After=network.target [Service] User=mo__vee Group=www-data WorkingDirectory=/home/mo__vee/'Zibivax home'/src ExecStart=/home/mo__vee/zibenv/bin/gunicorn \ --access-logfile - \ --workers 3 \ --bind unix:/home/mo__vee/'Zibivax home'/src/main/main.sock \ main.wsgi:application [Install] WantedBy=multi-user.target
Monde
pycache activate.fish activate_this.py easy_install gunicorn pip-3.8 python sqlformat wheel3 activate activate.ps1 django-admin easy_install-3.8 normalizer pip3 python3 wheel activate.csh activate.xsh django-admin.py easy_install3 pip pip3.8 python3.8 wheel-3.8
Monde
when I LS my bin dir I have even run the which gunicorn command yet still no results
Alikhanov Jakhongir
DRF or Django Channels ?
Django Channels Rest Framework, there is a package
Alikhanov Jakhongir
Django Channels Rest Framework, there is a package
called djangochannelsrestgramework
M***
How to use toster in django
Modibo Sangaré
👍
Optimus
How to use toster in django
use bootstrap toast
Gitonga
How do I force a page break in html print media? This seems not to work: {% if count|divisibleby:5 %} <p style="page-break-before: always;"></p> {% endif %}
Eugene
hey,guys. Can you recommend me any resource to learn django ? I tried to learn through courses by CS50. It's no use. Then, i tried to learn through many another courses on youtube, but i learned only few things :c I have no idea how to do that
Champak Lal
Why class based view is difficult?
Caesar
Hi guys. I need to create dynamic pdf file from html. And I'm using this library: django-renderpdf Everything working fine except 1 thing. I'm rendering data from ckeditor. Like {{obj.message|safe}} and I upload images from ckeditor. If image is too large pdf is not responsive and data rendering is incorrect. How can I fix that?
Caesar
or is there another library or way to create pdf file from html? Data from ckeditor and there can be imgs and other html tags
yusof
Hey anyone know the standard name for base serializer abstract?