Dark T
Fabin
Anonymous
Hi, when i want to post a user (it has a field that is foreign key(postname) for position table) the serialized data is valid, but it doesn't save or create. any help will be appreciated
Sayed
Hi guys, i have an api endpoint that takes an excel file as a request, how can i write a unit test to this api
Arezoo
hi , how can i learn write makefile?
Arezoo
what is syntax of makefile?
Sasha
Hi! using Postman, I got "detail": "CSRF Failed: CSRF cookie not set." . I turned off csrf from middlewware, but still getting this response. I am getting correct response with requests library.
Mirco
Arezoo
what is OT?
Giacomo
Does someone feel comfortable with django-filter? Or write filters on their own? Im looking for best practices
Maxim
Sasha
Mirco
sorry?
it's normal, the session auth Django uses excepts the CSRF token everytime you POST data
Read the full topic about it on official doc
Sasha
Mirco
Sasha
Mirco
yes the endpoint is django rest
Ok so, you have the handle the authentication classes
The SessionAuthentication requires the CSRF token passed via headers
Maybe you wanna use some other auth ways like token one
Varun
how can we capture the time spent by user in a specific page ..
Baljinder
How to add data into your database in django project how to use frontend website to add data in database in django any solution for that
SnipThinK
What best way to make chat application using DRF?
Mirco
Mirco
SnipThinK
Will check thanks
Piyush
I need RDBMS database design for e-commerce websites.
Thanks in advance.
yusof
Hey guys
My django web some times stuck on a request any suggestions how to monitor the requests?
William
yusof
William
yusof
Олександр
Hello, please tell me how to make a field with a choice of id models in the form. I tried like this but I get an error
https://pastebin.com/PTHWmK7V
Raad
Hello everyone,
Can you help me to fix long drop down menu? The menu shows all the list which is around 4000 items. It’s a searchable drop down using select2. I didn’t specify anything about it in the form.py
Raad
Vaibhav
How to optimise inlines in django, i have a 3 level inline in django and to fetch every object, it hits an query with results in M+N+O queries
NightE
I extended the User built in model to a customer model using one to one relation
and I want to show every customer's info in the profile.html page
how can I access the extended attributes
NightE
Dark T
Dark T
NightE
but I want to access other customer attributes
NightE
class Customer(models.Model):
user = models.OneToOneField(User, null=False, on_delete=models.CASCADE, blank=False)
phone = models.CharField(max_length= 12)
city = models.CharField(max_length=20)
NightE
phone and city
NightE
how to access them in the profile page
NightE
any help?
Dark T
Tez
phone and city
Jinja templating.
{% for u in users %}
// Displaying username
{{ u.user.username }}
// Displaying names
{{ u.user.first_name }} {{ u.user.last_name }}
// Displaying phone
{{ u.phone }}
// Displaying city
{{u.city}}
{% endfor %}
Dark T
NightE
Morteza
Mukul
{ "status" : "ok",
"totalResults" : 444,
"articles" : [
{
"source" : {
"id" :"the-times-of-india"
"name" : "TOI"
},
"author" : null,
"title" : "gun",
"urlToImage" : "https://bdjd"
}
How to display title and urlToImage in django with this api please help
VIGNA
Hi everyone
In django I wanna execute certain tasks in future at a datetime given by user. How can i do this, Please.
Eng. FoDy
Mukul
MIRZO
Hello, how can I use this for my models or forms
<label for="exampleDataList" class="form-label">Datalist example</label>
<input class="form-control" list="datalistOptions" id="exampleDataList" placeholder="Type to search...">
<datalist id="datalistOptions">
<option value="San Francisco">
<option value="New York">
<option value="Seattle">
<option value="Los Angeles">
<option value="Chicago">
</datalist>
MIRZO
I have changed option value to {{ form.value }}. But form is not valid. Please if you know tell me the way
M
Hi ..has anybody worked with drf-yasg b4?, how do u add manual parameters in a serializers? Im using a modelviewset with some sub-serializer for each method
No
Is there any tutorials for hosting django application in aws
Omkar
Omkar
Django deploy with nginx gunicorn
No
Yes but for database
No
I need to use rds..
Dark T
Yes but for database
Aws needs some yml files like the create stack file, so to avoid running into issues might need someone that can help you write those files perfectly
Dark T
Dani
Dani
You've got a dict inside a list inside a dict
Mukul
Mukul
Conditional elector of HRE
When is the max_length attribute displayed on a form?
There is code:
error_messages = {
'name': {
'unique': _("This concept already exists."),
'max_length': _("This writer's name is too long."),
},
}
When the name field overflows, nothing is displayed in errors, but the string is simply cut off.
Conditional elector of HRE
Here is the full code:
https://pastebin.com/ATLKeXWj
Tez
{ "status" : "ok",
"totalResults" : 444,
"articles" : [
{
"source" : {
"id" :"the-times-of-india"
"name" : "TOI"
},
"author" : null,
"title" : "gun",
"urlToImage" : "https://bdjd"
}
How to display title and urlToImage in django with this api please help
First import json in your view.
details = json.loads({ "status" : "ok",
"totalResults" : 444,
"articles" : [
{
"source" : {
"id" :"the-times-of-india"
"name" : "TOI"
},
"author" : null,
"title" : "gun",
"urlToImage" : "https://bdjd"
}
....
for detail in details['details']:
print detail['articles']['urlToImage']
ChanduAI9
How to backup Django application files with Google Drive API?
Shailesh
From. import views error
Shailesh
Can you give any suggestion regarding From. import views error in django.??
Mirco
P.
Hello everyone. I'm facing some issues understanding how https://django-allauth-2fa.readthedocs.io works.
I would like to implement 2fa into my website and force every user to use it.
I've already django all-auth working on the website, and now I've installed django allauth-2fa into the project.
Should I trigger the 2fa request on login? Should I send the user to the 2fa configuration after the registration procedure ?
Thanks any help is welcome since I have no experience with 2FA and it's the first time I'm implementing it.