ST
is is not good practice to test API access
What i meant by test is that it was a task, like assessment, sorry.
Jenish
requests library one more time )
ST
Got it, thanks.
Prabhakaran
How to host multiple sites in an instance ?
Prabhakaran
WordPress and django together..
Alda
Hi, guys i have two models: Country and Client. Country is related with Client trougth a foreingkey. i need upload csv file with information of my client and this csv has a field with the country name. ¿how can i put that name country in my field country in Client model?
Jaime
Hey frieds I need to retrieve the inverse relation of two tables joined with foreynkey. How would the queryset be. Thank you
Suresh
I have multiple rows of form's,Can table forms store the data into database? If any idea please help me.
Petr
Is their any method of adding countdown to quiz in Django
William
Use javascript and check countdown hits zero then change the question
Anonymous
can anyone tell
Anonymous
how can I POST value of an tab from template to view
Anonymous
through django is it possible
Hossein
in redis at acl part i wana add all keys for a user with exclude specify keys. any one can help me?
Anonymous
https://dpaste.org/uSGi
Станислав
hey guys, i need to implement some documentation for django-channels. Any ideas?
Станислав
Anonymous
I've to post this data
Anonymous
Yes
how can I do that please help me
Станислав
how can I POST value of an tab from template to view
using ajax like: ``` var form = $(‘form’); var formData = new FormData(form[0]); var JSONData = {}; formData.forEach(function(value, key){ JSONData[key] = value; }); $.ajax({ method: form.attr(‘method’), url: form.attr(‘action’), contentType: ‘application/json’, data: JSON.stringify(JSONData), }) ```
Anonymous
and how can i do this using django
Станислав
I've to post this data
also you can use form-data parser in view and send as usual form
Станислав
and how can i do this using django
it should be done on the client side, in templates if you’re using django for this :)
Anonymous
https://dpaste.org/uSGi
I'm using this method is this right
Anonymous
if request.method == "POST": posts_data = request.POST all = posts_data['all'] success = posts_data['success'] failed = posts_data['failed'] cancel = posts_data['cancel'] pay_click = posts_data['pay_click'] today = posts_data['today'] last_month = posts_data['last_month'] custom = posts_data['custom'] filter_submit = posts_data['filter_submit'] else all = success = failed = cancel = pay_click = today = last_month = custom = ''
Charanpreet Singh
Hello, I imported IsAuthenticated permission from rest_framework.permissions, however I am curious to know how does this actually work? Does it decode the JWT token and check for the user in the default users table? If yes, I have made my custom user table, how can I link that for authentication?
Anonymous
if request.method == "POST": posts_data = request.POST all = posts_data['all'] success = posts_data['success'] failed = posts_data['failed'] cancel = posts_data['cancel'] pay_click = posts_data['pay_click'] today = posts_data['today'] last_month = posts_data['last_month'] custom = posts_data['custom'] filter_submit = posts_data['filter_submit'] else: all = success = failed = cancel = pay_click = today = last_month = custom = ''
Ankit
I want to use space in username and I am using usercreationform. How can I do that?
Mirco
Mirco, when will new nodes be created and how will django updated cache configuration on running instances with new nodes, when using aws elasticache ?
Django settings are defined on startup so if you new nodes and changes to be done inside CACHES settings you need to re-deploy Django
Siddharth
Django settings are defined on startup so if you new nodes and changes to be done inside CACHES settings you need to re-deploy Django
So this mean i need to shut off my server and then re start it with newly created instances. Right ?
Mirco
So this mean i need to shut off my server and then re start it with newly created instances. Right ?
Yup, you need to set addresses of those instances inside Django settings
Siddharth
Yup, you need to set addresses of those instances inside Django settings
I got it thanks, 1 more thing i need to ask from you is : When i configure Application load balancer + Autoscalling on my ec2 instance, load balancer return unhealthy check and continues to terminated and create new instances. So how to correctly configure django to return ok to load balancer health check call ?
Siddharth
You need to understand the main reason of the unhealthy I mean which call fails
How can i check that ? I think either, i need to do apply some changes in nginx.conf file and ALLOWED_HOSTS, which then will allow requests to django so that i can return ok response, as in nginx.conf i allow responses from exampl.com and www.example.com. what else changes should i apply in nginx.conf and ALLOWED_HOSTS ?
Ankit
Why would you use a space in username
Becoz I want to. How can I tell user don't use white space while registeration
Ghorz
Becoz I want to. How can I tell user don't use white space while registeration
Common sense should tell a user that You can also write filters in java scripts that ensures no white space
Ghorz
You can also use django clean method to write filters
Ankit
Bro I want whitespace
Siddharth
U should have logs with the specific errors that help u understand it
Please tell me in short, how to log django error, with django + nginx + gunicorn ? And please suggest me changes for nginx.conf and ALLOWED_HOSTS. to allow requests from load balancer ( i mean the same changes you may have done to allow request from load balancer to django).
Siddharth
Because i think culprits are nginx.conf and ALLOWED_HOSTS. Which may be not allowing load balancer request to reach django.
thor
Guys I am trying to deploy my app to Heroku, but I keep getting an error which says "Web process failed to bind to $PORT within 60 seconds of launch" please how do i fix it?
Mirco
Because i think culprits are nginx.conf and ALLOWED_HOSTS. Which may be not allowing load balancer request to reach django.
This is easy, I mean you just need to allow that domain Remember you can use also wildcards for subdomains
Siddharth
This is easy, I mean you just need to allow that domain Remember you can use also wildcards for subdomains
Since I allowed my domain like example.com + www.example.com in both nginx.conf and ALLOWED_HOSTS, is this much setting enough to allow requests from load balancer to reach django ?
shashikant
i want to create a serializer using two different models.some fields in one models have relationship with other .How should i start with such scenario?
John
Guys how can we do pagination in APIVIEW in Django
John
??
John
I mean a limit offset pagination in APIVIEW
Anonymous
guys React.js form submit to django rest many to many how to do this
Mirco
I mean a limit offset pagination in APIVIEW
https://www.django-rest-framework.org/api-guide/pagination/
Adin
#ask how to change this list: list = [0,1,2,3,4,5] to be list = [2,6,10] using comprehension
William
Can you explain?
William
List = [i for i in arr if i%2 == 0]
William
2,6,10 what is the relation?
Adin
2,6,10 what is the relation?
make a multiple of 3
Valery
#ask how to change this list: list = [0,1,2,3,4,5] to be list = [2,6,10] using comprehension
lst = [0, 1, 2, 3, 4, 5] output = list(map(lambda x: x * 2, lst))[1::2] or output = [x * 2 for x in lst[1::2]]
Deepak
https://youtube.com/channel/UCAYHDIcIx6Op4NgHM1CufRA
AA
Hi everyone) How to use slug = AutoSlugField(populate_from='title', always_update=True) in models.py so that slug field can generate titles in russian language as well?
Nerd88
simple web app takes in input as a music mp3 then outputs a video that contains the music with really nice visualization.
ms
hi i wanna know about combining react js and django .
Anonymous
hi i wanna know about combining react js and django .
You should use Django and DRF For back-end and use react js for front-end What is your problem old sport
ms
dept on learning asp or node or py i think py is better when using react as a back Am I right ? or left ? 😜😜
ms
I am front end dev want to choose back 4 learning .