Adarsh
Achmad
i want to see the button
ASD
Hi any experience Django Developer?
ASD
Charly
B.
Can someone kindly offer suggestions for a Django project structure that conforms to IT standards?
Charly
Charly
Whats wrong with the standard django project structure?
B.
Charly
B.
Piyush
Hey ,I want to store image in response session I have encoded it but after decoding it still not getting accepted by imageField in model I think that image after decoding is just details of that image,can you tell me how can I save image in any way that I can use in any method.
Dafa
Hey Fellas
I'm creating a Python-django. Chatbot(chat-gpt).
I want the codes/syntax where by if l type in a question it will load answer from my models
Dafa
Moreover I'm to render the user input and response in my html file using JavaScript...
Guys help😪
Ammar
How can i write this sql code usnig orm
SELECT F.status, U.username, U.email
FROM users U, friends F
WHERE
CASE
WHEN F.friend_one = '$user_id'
THEN F.friend_two = U.user_id
WHEN F.friend_two= '$user_id'
THEN F.friend_one= U.user_id
END
AND
F.status='1';
Alexey
How can i write this sql code usnig orm
SELECT F.status, U.username, U.email
FROM users U, friends F
WHERE
CASE
WHEN F.friend_one = '$user_id'
THEN F.friend_two = U.user_id
WHEN F.friend_two= '$user_id'
THEN F.friend_one= U.user_id
END
AND
F.status='1';
from django docs
>>> Client.objects.annotate(
... discount=Case(
... When(account_type=Client.GOLD, then=Value("5%")),
... When(account_type=Client.PLATINUM, then=Value("10%")),
... default=Value("0%"),
... ),
... ).values_list("name", "discount")
Anv
Guys pls suggest some good project idea to showcase django skills in resume
Adarsh
Hey.. can anyone help me with this problem is I create two app in django these two have separate static folders how can I manage this static file
Mohsen
Temirlan
anyone help me please with creating schedule booking system for education service using DRF
Hoshyar
what?
Franco
what?
Hi, how are you? I have a question! I am following the w3schools tutorials but I have a question, how do I prevent the logged in user from going to the registration and login page!
Hoshyar
Franco
Hoshyar
Charly
Why?!
because its already logged in
Franco
Why?!
Because it is illogical that I can place the login url and show me the login form if I already have an active section
Charly
Franco
Hoshyar
Hoshyar
In your template you can change the links:
{% if user.is_authenticated %}
<a href="{% url 'logout' %}"
{% else %}
<a href="{% url 'login' %}"
<a href="{% url 'signup' %}"
{% endif %}
Charly
Share it
Franco
Ok, my bug has been fixed link https://pastebin.com/fX0fDHhE
Franco
Franco
I use whitenoise as file manager
Franco
read this maybe it will help you : https://www.w3schools.com/django/django_add_static_files.php
cj
Pywizz
Django's Official site has everything you need. Go for it.
Piyush
How can I store images in response session.
Sukha
Is that possible to create cms with django?
Muflone
Is that possible to create cms with django?
Until there's a local law in your country
Man, seriously if you want to work in this field you must learn to use search engines for your questions.
You'll have 0 possibilities to succeed if you are unable to use search engines
💙
I have created an application in an existing project, also created template files in a template folder. Then, wrote the codes correctly on urls.py, views.py, migration also done but when I run the server, it shows like page not found(404). This happening for the newly created application only
Artyom
💙
Artyom
Yes I did
Did you check how the location of the templates folder is configured ? Your paths in views.py configured properly? Template names?
Владислав
Владислав
Hello community, I want to create a blog for a practical exercise in the Django course
Would it be okay if I take a template from the Internet and write a backend for it, I mean, wouldn't it be much more difficult than creating my own project. I don't want to write the front end, but only the back part
ᅠ ᅠ
Hello, i have a problem with nginx+gunicorn. I set up the domain, the site works, but only one problem - it does not find static files
ᅠ ᅠ
I specified the full path to the static file in nginx, in settings.py too
ᅠ ᅠ
And since my files are constantly updated, I didn't use collectstatic, I used Staticfiles_dirs in setting
Doragonsureiyā
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
Muflone
ᅠ ᅠ
Muflone
It didn't help
This is repeating question
Static files have nothing to do with Django
Muflone
You simply put them where nginx can find them
Django is not used at all
Muflone
Oraz
Okay, thanks
ᅠ ᅠ
https://pastebin.com/wNxh0ky0
Muflone
ᅠ ᅠ
ᅠ ᅠ
ᅠ ᅠ
ᅠ ᅠ
Not Found: /static/file/75847.mp4