ꜱᴀᴇᴇᴅ
Hello friends, I am getting the last user visit in Django, now I want to return True if it is online, return False if it is offline, but I do not know how to implement it, can anyone help 🤔
LB (Ben)
I want to know how to use a variable python in JavaScript
Could you explain a bit more? If it is something simple you could just add a global variable in whatever your base template is. <script>window.myVariable = true;</script> For something more complex you may need to ensure you escape the JS correctly. Here are some docs links for this. https://docs.djangoproject.com/en/4.0/ref/templates/builtins/#escapejs Or for large amounts of data - https://docs.djangoproject.com/en/4.0/ref/templates/builtins/#json-script
Richard
I want to know how to use a variable python in JavaScript
Variable python contains a result of a request from my database. Now, I search a way for use this variable in JavaScript script. I'm doing a school project about website using Django.
Vein
I have a website that has data entry, OK. You just enter data and send data. You send from about 10 emails to one email, which is affiliated with my company. It comes in pdf format. I want to modify the internal form of the pdf, I mean it has a very beautiful design and I have the files. If you can help me because my work is standing on it, I swear
Nozir
Variable python contains a result of a request from my database. Now, I search a way for use this variable in JavaScript script. I'm doing a school project about website using Django.
{% block js_block %} <script type="text/javascript"> var context = {{context|safe}} var debit = document.getElementById('debit') type = document.getElementById('type') const type_tag = document.getElementById('type') type_tag.onchange = function () { debit.value = context[type.value] } </script> {%endblock%}
Rohit 007
I am getting an error like " A server error occurred please contact the administrator"
Rohit 007
When iam fetching product id and user id for checking if items already in cart
Rohit 007
If i remove product id no error
Rohit 007
Check=Cart.objects.filter(productid=pid,userid=request.user.id, status=False
Anonymous
Project has a celery task need to execute every 10 seconds on specific weekdays and hours , could not use crontab because minute resolution , any idea how do that?
pavan
hi frnds i need one help,i have drop-down list of input files(input file type). i need to put multiple check boxes for those drop down list. i tried but I'm getting checkbox for one file only.
pavan
pls help thanks in advance..
G4st0n
Is not very smart make public the dns record of your server
Ted
Hi I would like to know if it's possible to integrate Request Tracker into Django rest Api... I've found sources but I really don't know how to get started
Siya
Can anyone help with converting 0level dfd to 1level dfd for a project?
Umarov Shuxrat
django.db.migrations.exceptions.NodeNotFoundError: Migration all.0005_remove_ordermodel_p_id_remove_ordermodel_user_id_and_more dependencies reference nonexistent parent node ('all', '0004_alter_korzinamodel_product')
Umarov Shuxrat
#help
G4st0n
Is jango 4 Stable ?
eugene
In django 4 async orm?
Mirco
Eli
Hey guys I wanted to know ,what is ur idea about FastApi and DRF ?
Mirco
Hey guys I wanted to know ,what is ur idea about FastApi and DRF ?
Two different stuff, choose your preferred one based on your needs
Eli
What ?
I don't know which one is suitable for me
Mirco
I don't know which one is suitable for me
Up to your needs, you can build API with both If you have already a Django project, it's easier to go with DRF If it's new, you can try FastAPI
Eli
Up to your needs, you can build API with both If you have already a Django project, it's easier to go with DRF If it's new, you can try FastAPI
I have some projects with DRF and I'm kind of a junior. But I have a job offer but they work with FastApi and I don't know, is it a good idea to change?
Eli
Yeah why not ? Working with FastAPI is cool
I was just thinking, I have to get much more experience with DRF and then change the framework
Mirco
I was just thinking, I have to get much more experience with DRF and then change the framework
Not mandatory, you can start working with FastAPI without being expert of DRF The main skill is to have is Python
Doragonsureiyā
Thanks for your advice 🙏🙂
You're welcome! 😊
Heet Raval
Is jango 4 Stable ?
Whole django is stable and efficient
Heet Raval
Hey how can I learn django rest framework any resources?????
Doragonsureiyā
Hey how can I learn django rest framework any resources?????
Are you looking for Django REST Framework documentation? Here you have it: https://www.django-rest-framework.org/
Farhanah Jamal
how to filter datatable using ajax from the html file and filter it in the view in django?
Andrej
Hey how can I learn django rest framework any resources?????
I have learnt it in one example project. You should implement CRUD. Create, Retrieve, Update and Delete some items in your database. You can learn it in a day or a couple hours.
anuprash
Hi , can anyone help me, for payment integration (payu) in django
Doragonsureiyā
Hi , can anyone help me, for payment integration (payu) 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
anuprash
No
anuprash
How to apply payment integration with payu in django
The
Hey all Mongodb i work with has around 1 millions record and i want to get it into dataframe and perform some things. Is it wise to pull all docs at once I mean should i get all docs at once or get in chunks
Dasa
I am working on django rest_framework and I need to return the uuid that got created in a POST call with perform_create in the response object. This is how my serializer looks like class AbcSerializer(serializers.ModelSerializer): uuid = serializers.ReadOnlyField() class Meta: model = Abc fields = ['uuid'] But when I try to do a post, I just get with bad request This field is required.
Mirco
You need to use 2 serializers, one for POST and one to be used and return the UUID like you did above
Mirco
Can you by any chance share any reference?
start by creating the serializer for creating your Abc model by removing obviously the UUID from Meta's fields
Mirco
Can you by any chance share any reference?
https://pastebin.com/W3N8vPZp an real example, as u can see 2 different serializers are used 1 to create and 1 to be used as response of that create
Sachin
I want to restore database in django mysql
Doragonsureiyā
Thank you so much..
You're welcome! 😊
EDEN
Do any know about login with mobile otp
karry
Yes I do . What do you wanna know regarding mobile otp???
2000031953_Gyan
guy's anybody knows how to deploy project in Heroku then please help me !
Doragonsureiyā
guy's anybody knows how to deploy project in Heroku then please help me !
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
Yury
Hello everyone. Can someone explain me (as a beginner) should i create a new app for auth in django project or i can just make it inside main app?
Ted
Hi I would like to know if it's possible to integrate Request Tracker into Django rest Api... I've found sources but I really don't know how to get started
Rupali
Anyone help me to make django assignment
Doragonsureiyā
Anyone help me to make django assignment
We know the rules are quite long, but read them, because on average, hundreds of users are banned from this network every week. Reading the rules will help in avoiding this pitiful fate.
Anonymous
Hi, I want to learn Django, what source do you suggest?
Doragonsureiyā
Hi, I want to learn Django, what source do you suggest?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls