Manish
Hello,how can i send push notification from django rest framework?
Anonymous
When a person comments on an article on my site, send an email to the author of that article Can anyone help me?
Doragonsureiyā
When a person comments on an article on my site, send an email to the author of that article Can anyone help me?
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Rutherford
Pavel
Hi. Is it possible to extend enum (IntegerChoices)? I have enum NumberChoices I need to extend it with 1 more value
crazzystunner
Anyone know, how to generate auto feilds based on input tag generated using javascript in frontend to save those details in database
Manish
Where?
In react native application
Neha
Error: 'utf-8' codec can't decode byte 0xe2 in position 443: invalid continuation byte, File: views.py,
Maxim
Error: 'utf-8' codec can't decode byte 0xe2 in position 443: invalid continuation byte, File: views.py,
https://lmgtfy.app/?q=Error+%27utf-8%27+codec+can%27t+decode+byte+in+position+invalid+continuation+byte%2C+File
Doragonsureiyā
Python groups in other languages (‼️ Not managed by us ‼️) Amharic @python_amharic Arabic @arabipython Azerbaijani @azepug Chinese @pythonzh French @python_francais German @pythonde Hebrew @pythonisrael Hindi @pyindia Indonesian @pythonid Italian @python_ita @pythonita Kazakh @python_kz Malaysia @pythonmalaysia Persian @pyfarsi Portuguese @pythonbr Russian @ru_python_beginners @ru_python Spanish @PythonEsp Swahili @python_eafrica Turkish @python_tr Uzbek @python_uz If you have an (active) group you want to add, ask in the meta group, link in the rules page.
M.T
😂sory🌺
Anonymous
Hello, can you help me with something? I have problems with Javascript in my projects in Jango. Javascript code sometimes doesn't work. For example, if I have Javascript code in script.js file, it doesn't work.
Elvin
Guys, what do you recommend to learn after advancing in django? React o Angular? And why?
Sadanandam
Please give me path for learning Django from basics
Doragonsureiyā
Please give me path for learning Django from basics
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Ismael
Error: 'utf-8' codec can't decode byte 0xe2 in position 443: invalid continuation byte, File: views.py,
Check your file, you should have a "â" char somewhere..., which is the 0xe2
Moe (محمد)
Whats the better way to add react to existing Django in production? 1- Do i write API views and connect the frontend with backend through the app? Or do i serve the react within django?
Moe (محمد)
I saw a tutorial where they do manage.py frontend, and then put everything related to react there using django-webpack l
AFK
Can anyone suggest me a tutorial or some channels to Start with CELERY in django? I dont have any idea about celery How and when its used
@(*_*)@
👋
@(*_*)@
how can I display the last Post from each category
@(*_*)@
def home(request): cat = Category.objects.all() for i in range(len(cat)): test = Post.objects.filter(category__name=cat[i]).values('pk','title', 'lite_body','date').order_by('-id')[:1] print(test) data = {"test": test} return render(request, "home.html", context=data)
@(*_*)@
I have only one record from the database displayed
Vaibhav
I am using celery task_soft_limit to 5 min, but in task level i want to set it infinite, is it possible to do so?
Muhammad
What is does docs simply means ?
SJ
Anyone who can deploy my Django project on Cpanel.?
Mirco
Anyone who can deploy my Django project on Cpanel.?
Don't do it, use other platforms
Muhammad
documentation
Yes I know it is documentation, but which documentation ? is it documentation under a comment that I know or it is means other meaning else ?
Anonymous
serializer = TodoItemSerializer(queryset, many=True) why many is True And what exactly this code is doing What I understand queryset- get all todo from database and serializer convert complex data format into json like format but how it's doing it?
@(*_*)@
Just append .first() to your query to get the first record or .last() to get the last record
Thanks we decided differently: dates = Post.objects.aggregate(max_date=Max('date')) result = Post.objects.filter(date=dates['max_date']).values(.........)
N
Guys, I need it. Appointment booking form on the website. And anyone who enters the site makes a reservation, I will receive a notification on the site in django
Doragonsureiyā
Guys, I need it. Appointment booking form on the website. And anyone who enters the site makes a reservation, I will receive a notification on the site in django
We're not here to do your job for you. This group is to help you on specific issues you have in YOUR code, so you have to show the code you wrote by yourself and explain where and why you are stuck... as simple as that. 🤷🏻‍♂️
Doragonsureiyā
I know my friend though. When I find how to write the code here is the problem I hope you understand me and I hope you can help me
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Doragonsureiyā
I want to make a reservation site with a doctor. Anyone who enters the site makes an appointment reservation. I receive a notification that a user has made a reservation for me on the site
So, why don't you do it yourself first? When you have an issue with the Python code you wrote (read rule 5️⃣ to show your code), come back here and people will help you. 😉
Sloth
This is related Django signal post_‌‌‌‍save method: Is there any way i can get the old value in post save of the column that was changed?
Doragonsureiyā
Explain your intention. My brother will help you. Or send the picture code
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Sloth
Explain your intention. My brother will help you. Or send the picture code
Ok so i have to run a few lines of code when a change in table xyz happens for this i am using post_save signal. Inside the post_save signal i want to run some lines of code that needs previous instance of the row that was changed I want to know how to get the previous instance of that changed row inside post_save method
Anonymous
Hello everybody what is this error: content_object = models.GenericForeignKey('content_type', 'object_id') AttributeError: module 'django.db.models' has no attribute 'GenericForeignKey' this error when I make migrations .
Anonymous
I make an internet shop on video and there is this fields
cj
I make an internet shop on video and there is this fields
GenericForeignKey doesn't exist —anymore— in Django's ORM ¯\_(ツ)_/¯
Anonymous
I can import this or what have I to do ?
cj
I can import this or what have I to do ?
use ForeignKey instead... and/or stop following old tutorials
Anonymous
OK many thanks I'll try tomorrow
Ko
I have series of formulas to be fed. In the front end I want a simple input fields. how to begin with it on Django
De Lorenzo
What is the best module to produce the below from dictionary
Doragonsureiyā
What is the best module to produce the below from dictionary
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Roman
How to connect static files to django on the heroku server?
Roman
If i start django server on the local host everything is work
BSAB
If i start django server on the local host everything is work
https://devcenter.heroku.com/articles/django-assets
BSAB
Can it help you?
Roman
https://devcenter.heroku.com/articles/django-assets
thanks a lot, it's really easy method, than those i find before
Carlos🇻🇪
Sorry people, can someone help me? I've a DRF and a Frontend with VUE 2.0.
Carlos🇻🇪
All work perfectly but an ajax call PATCH return to me "Did not find method in CORS header ‘Access-Control-Allow-Methods’", also if the call use the same domain for Backend and Frontend, unique thing different is that the BE is served by gunicorn on port 8000 proxied by nginx and the FE is served on port 80 nby nginx too. Here the padstebin where i've listed the call from FE, the settings.py for corsheaders, the views.py and the serializer.py https://pastebin.com/Mk5dp4wH
Carlos🇻🇪
It's great if someone can gve me a hint on what I've do wrong
Sloth
you can't, because it's a post save (which means, after saving) you should do things in pre_save if you want to play with the previous value before being overwritten
Yes you are right but i want to run a few lines of code only when then row or update is successfully saved, pre_save doesnt guarantee me that the row will be saved without any errors is there any workaround
Sloth
?
....
get and error :AttributeError at /resume-builder 'Resume_modelFormFormSet' object has no attribute 'instance views.py: if formset.is_valid(): formset.save() return HttpResponseRedirect(reverse('detailresume',args=(formset.instance.id,))) return super(TemplateView,self).render_to_response(context) . how can i fix this . ? why is this error
Gaming
Can anyone help me to learn django
Doragonsureiyā
Can anyone help me to learn django
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
....
Can anyone help me to learn django
Lot of tutorial available in youtube , Also django has official documentation . So , you can check there. After if you have any doubts , .Ask here ,