Husen
CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False.
Hello everybody. when i run python manage.py runserver it gives me this error. what can i do?
Maxim
Dnyaneshwar
how to configure static files for debug=False
Dnyaneshwar
because when i do debug=False css has not applied on my project
cj
Vallas
Habib
Hi there, I have a question
If I have a Django app and I hosted it somewhere say render or anything
Now if I want more than 1 people to access and use it without any problem what do I need to do I need to change something in my django code or the server
Charly
Habib
So you mean just hosting it would do
Charly
Habib
Yeah actually it was API that I connected to separate basic frontend...
It does open up the frontend but when two or more requests at the same time it fails
Charly
Habib
Maybe because of the free tier? It can't handle enough processing?
Habib
How does it fail?
Just stops there
Bte the API it takes a title and creates a simple video
Charly
Charly
Habib
Actually let me share a more specific erorr
Mohit
Hi there, i want to try to connect RDS with AWS and also want to create table from lambda please suggest how can I do this
Habib
Why do you say it stops? Be more specific
t: 96%|█████████▋| 185/192 [00:16<00:00, 17.31it/s, now=None][2024-07-24 18:13:52 +0000] [1] [ERROR] Worker (pid:8) was sent SIGKILL! Perhaps out of memory? This is what I get sometimes
Charly
Habib
Yeah the request takes just title like say top 3 mountains and returns a drive link to generated video...
The
Image downloading
Combining them into video
Uploading to drive
All takes place in this
Habib
That's why I was saying maybe the memory and all..bcz this was on render's free tier
Charly
Habib
Yeah can you pls guide on what would be correct approach
Habib
The view itself is only calling functions but again the code is in another functionality.py file
Mohit
Charly
Mousam
Hello everyone,
I am new to django
Currently learning about django authentication
Issue : when I hit "/login" url login form gets open but when I hit "/logout" it says this page is not working right now 😅
Mousam
I setting.py I have set the LOGOUT_REDIRECT_URL='/login'
The Inspired
The Inspired
have you set up path for /logout?
Mousam
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('loginapp.urls')),
path('', include('django.contrib.auth.urls')),
]
Charly
Mousam
it's the app level url
Mousam
urlpatterns = [
path('',views.home,name='home'),
path('home',views.home,name='home'),
]
Charly
Mousam
I didn't get what you are saying 😅
Mousam
Can you explain a bit
Mousam
Mousam
Charly
Show what you see in the console
Mousam
Method Not Allowed (GET): /logout/
Method Not Allowed: /logout/
Mousam
Mousam
Yes, when I created a logout button using post method it works
But when I hit the url 'logout' without using button it shows method not allowed (get)
Charly
Mousam
Not actually I was following a toturial video of 'tech with tim' to learn about authentication
Mousam
Maybe that method works on previous version of django
A.JAHANGIR
Hello everyone, I use bootstrap in the main template and now I want to link a css file to the sub templates but I can't change the style with css file...
I put that link anywhere in my code but it still doesn't work
Mousam
I have one more question,for authentication in production level projects we can use django default authentication or we have to create it by ourselves?
A.JAHANGIR
Mousam
🆗
colo
hello, sory my english is ver poor. I have a project DJ4.2, and delete one table. Then recreate it but not create the table. How can rebuild all ?
Mirco
Habib
Alex
A.JAHANGIR
static files url
yes, css file is in my static files folder
the problem because of bootstrap link
Alex
Charly
A.JAHANGIR
A.JAHANGIR
Charly
a link tag
If you are not specific no one will help you
A.JAHANGIR
what do you mean about the way?
Charly
A.JAHANGIR
I create a main template using bootstrap and for that I added a link tag for bootstrap documentation, now in the sub template I can't use css code because of that link
Charly
Charly
why you say because a link you can't use css? that makes no sense
A.JAHANGIR
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.3.1/dist/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
A.JAHANGIR