Igor👨💻
is django more useful than flask in html css websites
Igor👨💻
what is better python and django with HTML/CSS or js with HTML/CSS?
Igor👨💻
ok thanks
Ixlos
hello
how to integrate hikvison face control with django web app?
🏅♐Mark
hi
🏅♐Mark
i am facing a issue that i want to display booking tickets actual amount in razorpay payment page
🏅♐Mark
🏅♐Mark
Emmanuel
Maltapopoulos 🇲🇹
Sam
Guys this is my context_processor code:
def context_processors(request):
try:
if request.user.is_authenticated is True:
cart = Cart.objects.get(user=request.user)
else:
cart = Cart.objects.get(session_id=request.session['anonymous_user'])
except Cart.DoesNotExist:
cart = {"total_quantity": 123,
"len": 0,
"total_cart_price": 0
}
return {"cart": cart}
and this is my template:
{{ cart.len}}
{{ cart.total_quantity }}
but it doesnt show them in the template! what is the solution? my context_processor was working pretty well until i changes some things
Sam
Yo_
Does anyone here have experience in building django chatting applications? I need to ask you about something
Frozen
Does any one tell me I have a model and have attachment field in model which is a Filefield...
How to handle multiple file uploads in Django Rest Framework
Rahul
Frozen
I want to select multiple files while post
aмιrнoѕѕeιn
Hi guys, can anyone help me?
aмιrнoѕѕeιn
i want to add the sessions in my django login project.
aмιrнoѕѕeιn
if anyone know the Way tell me......
Sam
i mean the
from django.contrib.auth import login
function
🏅♐Mark
i am facing a issue that i want to display booking tickets actual amount in razorpay payment page
🏅♐Mark
How to do that please help
Kirill
Help me with how I can pass a request token to the server if HttpOnly is enabled. I implemented the transfer with HttpOnly disabled, here it is:
const UserProjects = () => {
const [projects, setProjects] = useState([]);
useEffect(() => {
const fetchProjects = async () => {
try {
const accessToken = Cookies.get('jwt_token');
const refreshToken = Cookies.get('refresh_token');
console.log('Access Token:', accessToken);
console.log('Refresh Token:', refreshToken);
const response = await fetch('http://127.0.0.1:8000/api/projects', {
headers: {
Authorization: `Bearer ${accessToken}`,
'X-Refresh-Token': refreshToken,
},
});
if (response.ok) {
const data = await response.json();
console.log(data);
setProjects(data);
} else {
console.error('error get project:', response.status);
}
} catch (error) {
console.error('error get project:', error);
}
};
But I don't understand how to get a token when HttpOnly is enabled
Андрей
Hello everyone! Please help, I'm not familiar with Django and I'm trying to deploy the open-source solution DefectDojo, but I can't get it to work with LDAP. Can anyone suggest where to look?
Charly
Charly
And we he talk about developing with Django, not supporting things made on django
Андрей
"Unfortunately, there are no details. I am following the guide, everything seems to be correct, but there are no requests to my LDAP server."
Андрей
https://documentation.defectdojo.com/dev/integrations/ldap-authentication/
Charly
Андрей
What commands to enter, what logs to check in order to provide details? Thank you.
Charly
Charly
and again, it might be better if you ask on their github or something
Charly
we can only support thing you done here
Charly
not third party projects
DR
Hello friends How is it possible to register a database table that has 20 rows and 30 columns for each year? If I choose the year in the output, for example, will it show the data of the same year of the desired variables?
Charly
DR
Charly
solution?
Create your model then just write a query,.it is bsic filtering
DR
Charly
Igor👨💻
Igor👨💻
Shivam
Can anyone help me , creating a django single sign on application with email authentication having login ,signup , forget password features
park seo joon
How to use custom manager in database please any ideas
Yo_
I want to send files to the chat application so that chat room guys can see it
Yo_
How to do this using django
Yo_
It is based on Django channel and redis channel layers
Yo_
Is there any tutorials
Charly
It should be the same as sending a message
Charly
You just put a url of the file
Siva
I m getting blank not found page for my django project...
Siva
How can I solve this issue
Doragonsureiyā
How can I solve this issue
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ā
This is not a Django specific question, please delete your offtopic message.
If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Otabek
clouded
Otabek
Charly
Ok
So are you going to move your post?
Charly
Otabek
cj
It's related to django
do you have a Django issue? I mean, something with the code you wrote using Django? like migrations issue, urls, views, models? like that?
KartiK
how to write a docker file like in my django app its pipfile and pipfile.lock in place of requirements.txt also when i asked gpt about this it showed too much i think it was very unnecesarry does anybody know dockerfile of django with dependencies inside pipfile.'
Doragonsureiyā
Charly
Yes but your question does not involves Django