Hi again, I think you are a bit confused about the difference between django and a php framework. In PHP all pages are php files - and PHP has the stupid preference to try to run everything, even if there is an error (except when you have a syntax error - that will also break your php site). What you referred to in your first question was a syntax error in a python file. That doesn't compile and therefore runserver won't work. Like I said earlier - these types of errors halt the runserver. However running a django application in production, you will be running something else for serving the python files. So all files that are used for startup, need to have correct syntax. But if a view file that doesn't get run on startup doesn't have that, only the process serving the request will stop and not the entire server.
Mostly when you run a django application you will get an error from a view file or from a html template. This will not break the entire application, but only the view for the user requesting invalid data. So it will not break. Don't forget that Youtube and Instagram are running on django - they are developed by several thousands of developers, and it works perfectly. Andréas Den tors 3 okt. 2019 kl 09:04 skrev Amit Sharma <lettertoa...@gmail.com>: > Hi , > I agree with your point and i do follow same. But what my main concern > here is :-- > > Can we have in django that if one page has got some error than other page > do not stop working. This was only thing i want to know. Kindly help. > > > > > On Wednesday, October 2, 2019 at 1:19:49 PM UTC+5:30, Andréas Kühne wrote: >> >> Hi, >> >> You shouldn't use runserver in production - that's not what it's for. So >> first read how to deploy django in production. When in production, you >> don't deploy code that doesn't work - so that means that you won't get this >> issue. >> >> You shouldn't work on live working websites - that's not how you do it >> professionally. You should work locally on your machine and then update the >> production server WHEN everything works. Allowing someone to work live on a >> production server is a major issue. Like you said, you will probably crash >> the server when doing that. >> >> Django development is very friendly - as long as you work in the correct >> way: >> >> 1. Work on a development machine - update the changes and run your tests >> to make sure that everything works as expected. >> 2. Create a package for the website somehow (git archive, create a docker >> image or something like that). >> 2a. Test your code on a staging server. >> 3. Update your production server with the working code. >> 4. Restart the application server on the production server. >> >> If you follow that mindset it won't be a problem when working - and this >> is basically the way you should be working REGARDLESS of what framework you >> are using. Otherwise you will get changes done in several places - you >> won't know what is the latest code and so on. >> >> The list above is a minimal list - you could of course expand on that as >> well. >> >> >> Regards, >> >> Andréas >> >> >> Den tis 1 okt. 2019 kl 13:13 skrev Amit Sharma <letter...@gmail.com>: >> >>> I am new to Python and django , I worked on C# and php as developer >>> earlier. My problem here is Entire Application in Django shuts down with >>> single error. >>> >>> for example i start my website with "python3 manage.py runserver >>> 0.0.0.0:8000" example:-- i have two pages home and register >>> 1) if i make error in register page code(register.py) , It shuts down >>> home page too. Is there a way to prevent that as in php and C# in both one >>> page do not effect other. >>> 2) how to work in django with team one errors full team hangs. >>> >>> 3) How to work with live working websites things may become too risky. >>> >>> 4) can we make django development as friendly as C#, PHP ......... and >>> other programming language >>> >>> also i am not able to find article related to this. kindly help >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to django...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/7d81706a-2f84-4f55-a25c-1bae726a8879%40googlegroups.com >>> <https://groups.google.com/d/msgid/django-users/7d81706a-2f84-4f55-a25c-1bae726a8879%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/807cd268-aecc-45db-84b9-6d3371bb5d49%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/807cd268-aecc-45db-84b9-6d3371bb5d49%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK4qSCfxSp_jOk3pzYagvGNMbFk3-a1FVv4eskfeO66MvwN4Qg%40mail.gmail.com.