Achmad
i want to see the button
Doragonsureiyā
i want to see the button
What are you talking about?
ASD
Hi any experience Django Developer?
Charly
Hi any experience Django Developer?
This is a group of django there are plenty of people with experience on it, why do you ask?
ASD
This is a group of django there are plenty of people with experience on it, why do you ask?
Im working on an Api and I need to understand few things and so i wanted some help
B.
Can someone kindly offer suggestions for a Django project structure that conforms to IT standards?
Charly
Whats wrong with the standard django project structure?
Ruslan
Can someone kindly offer suggestions for a Django project structure that conforms to IT standards?
I can suggest mine This structure I did using an experience I've got https://github.com/ruslan-korneev/drf-postgres-backend-template But this is really subjective thing
B.
Whats wrong with the standard django project structure?
I don't know anything about django. I am a new learner that's why I'm asking for some django project structure.
Charly
I don't know anything about django. I am a new learner that's why I'm asking for some django project structure.
Forget that then and instead go to the official django tutorial. Django already has an structure.
Jalal
Can someone kindly offer suggestions for a Django project structure that conforms to IT standards?
django-styleguide is a theory on how to build applications with Django. This build was created by the folks at Hacksoft. They have a Djago-styleguide-example to further demonstrate style guides in a real project. I use it, but it's not the only way.
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
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
You first create a static folder in the main directory, then in the settings.py file you specify this folder as a folder for static files.
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
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!
What do you mean? Do you mean to prevent from entering login url?! Or removing login link from user's page after login?
Franco
What do you mean? Do you mean to prevent from entering login url?! Or removing login link from user's page after login?
prevent you from entering the login and registration url, after starting the session
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
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!
First google result: https://stackoverflow.com/questions/70528170/prevent-user-to-access-login-page-in-django-when-already-logged-in
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
You want to remove login url after user logged in?
Not remove but there is no point on showing the login form to the already logged user
Franco
You want to remove login url after user logged in?
problem because what I want to avoid is that by the GET method they can enter the url /signin/
Charly
Share it
Franco
Ok, my bug has been fixed link https://pastebin.com/fX0fDHhE
Franco
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
I have configured the static in the following way : https://pastebin.com/L5zqaSFx python manage.py collectstatic --help
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
read this maybe it will help you : https://www.w3schools.com/django/django_add_static_files.php
don't follow things from w3schools, that's the worst thing you can do
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
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)
ᅠ ᅠ
Then run collectstatic
It didn't help
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
ᅠ ᅠ
You simply put them where nginx can find them Django is not used at all
When I just run a django project, everything works, and here everywhere I indicated the path to static files (!which can be added), but it doesn't even display them
ᅠ ᅠ
Indicated where?
Wait, I'll send pastebin now
Oraz
Okay, thanks
ᅠ ᅠ
https://pastebin.com/wNxh0ky0
Muflone
https://pastebin.com/wNxh0ky0
1) are your files in the indicated directory? 2) is the browser requesting the correct path?
Maxim
Okay, thanks
ask @pythonofftopic
ᅠ ᅠ
1) are your files in the indicated directory? 2) is the browser requesting the correct path?
Everything is displayed in the browser, but without static styles and photos. Files in static/css/ and static/file/
ᅠ ᅠ
1) are your files in the indicated directory? 2) is the browser requesting the correct path?
2) I didn't understand the question, but in the console it says "not found static/file/smthing.jpeg"
Muflone
2) I didn't understand the question, but in the console it says "not found static/file/smthing.jpeg"
1) are your static files present in the directory you specified in the nginx? There is no different answer then yes or no 2) is the browser requesting the /static path specified in the nginx location?
Muflone
1) yes 2) I don't see how he can request it
2) so show us the browser connection requesting the resource
Muflone
I can't throw photos here
Write the requested path only
ᅠ ᅠ
Write the requested path only
domain.com/post/(post_id)
Muflone
domain.com/post/(post_id)
This is not a static file request
ᅠ ᅠ
Not Found: /static/file/75847.mp4