The mint of Linux **
Can django path call a fun that is defined after else eg - else: Def xx(): So can i call this fn from urls.py ???
yes but u have to import the views actually it's the same as per mentioning on view
Root
Why my django app on running with gunicorn with debug=False shows 500 error while with debug=True works
Mirco
Nothing in logs
I don't think so or you have bad configured logs
Root
When running with debug=True it runs fine
Root
But with debug =False 500 error
The mint of Linux **
it means internal server error
Root
Root
But it works fine with debug=True
Root
And debug=True is big risk for production
The mint of Linux **
But it works fine with debug=True
no no .. look it maybe happend that on home page or basic page its working
The mint of Linux **
but if debug = True so check all linking of page by clicking alla buttons and features you will get a error obviously
The mint of Linux **
yupp
Anonymous
I have being trying to save a profile to user from at the same time but no success.. Has anyone gotten such issue before ? I don't want to build a custom user either
Mirco
Ok thanks will try this
Are you using runserver ? Or are you running django with gunicorn or similar ?
Mirco
Mirco
Gunicorn
Where are you redirecting error logs ? Into log file or stderr ?
Root
As heroku display it
Mirco
Ah you are using Heroku Ok Heroku should have log files where you can see the error
Mirco
Ah you are using Heroku Ok Heroku should have log files where you can see the error
Look for application logs, I don't remember how Heroku calls it
Root
Just we have to visit view log
The mint of Linux **
i am not getting one point if it is a error you will get it locally
Mirco
On heroku dashboard it display logs
But you are not seeing the error right ?
The mint of Linux **
and if it is hosted also and debug = true u will get it globally also.
Mirco
i am not getting one point if it is a error you will get it locally
He can get it locally, but he needs also to learn how to inspect logs on prod env scenario
The mint of Linux **
what ide u r using
The mint of Linux **
Mirco
why not ... we all get most of the errors locally
How do you get errors due to HTTPS locally ? 🙂
Mirco
And it's just one of the many other examples
The mint of Linux **
change it...allowest host = []
The mint of Linux **
debug = True
Mirco
change it...allowest host = []
Not enough, it's not the same scenario you have on a prod-like env
Mirco
debug = True
Not enough
Mirco
That's why you need a staging env before going on Production
Mirco
Some errors that appear on prod env, cannot appear if you try to reproduce them locally because you don't have the same scenario with the same configuration
The mint of Linux **
but when u debug= True so...the error must show where its happening
The mint of Linux **
or use google analytics or ahref .com to check in details explanation of what is error in ur website
The mint of Linux **
i personally use it
The mint of Linux **
and also chek my liite try : https://www.sakshamfoundations.in
The mint of Linux **
my little work
Mirco
but when u debug= True so...the error must show where its happening
Errors related to your code for sure but other errors cannot be catched by just using the dev mode, as I told you before in most of scenarios the error won't appear locally but it will appear on Prod and you won't understand the reason why initially and that's why you need a good log configuration One example could be setting Sentry
The mint of Linux **
you guys are more knowledgeable ,.... so u know better
The mint of Linux **
☺☺☺
The mint of Linux **
i am kinda noob now😝😝
Дауран
We just had more headaches 😃
And spent more times 😁
The mint of Linux **
We just had more headaches 😃
though more knowledge and i respect all of u !!
Nats
I would like to ask, if the data volume is at the level of 100,000, using UUID as the primary key, besides preventing others from guessing the scale based on the self-incrementing primary key, is there any benefit?
Anonymous
Hello Please how do I delete a particular item in a model after a certain amount of time has elapsed? Please help
Mirco
Hello Please how do I delete a particular item in a model after a certain amount of time has elapsed? Please help
You just have to schedule a task that will delete the item by passing its id
Mirco
Can it be a delete view?
A normal view is enough, you can use the delete view but you need to change the default behaviour as you won't delete immediately the item
Anonymous
You just have to schedule a task that will delete the item by passing its id
Please can you write a code sample for this? I don't seem to get it
Mirco
Please can you write a code sample for this? I don't seem to get it
Web is full of example, trust me 🙂 If you type django schedule delete item you will receive interesting stuff
Doragonsureiyā
Okay Mirco Thanks😊
You're welcome! 😊
Anonymous
Plz guys I need urgent help I can not connect django with flutter
Mirco
What's your main difficulty ?
Anonymous
Do I need to add frontend folder in setting.py
Anonymous
I mean I os.path.join.. etc?
Holla
Yes will need to load static files
Pra
Hy im not able to add jinja templte to pycharm .not much stuff is there on youtube related to this . Any alternate i can add istead of jinja ?