Reg:- django application optimization

20 views
Skip to first unread message

Senthil Kumar

unread,
Jul 14, 2021, 9:35:19 AM7/14/21
to django...@googlegroups.com, Sethuraman Kannan
Hi Team,

We are new to Django & Python application. Recently we are migrate from PHP. We are  developed the application in Django / MySQL / UWSGI. 

Please guide us for following items.

1. Enabling Error Page. 
  • We did debug = False. But we are not able to access any media items using the URL. - Please give any suggestion to for both
  • We are running the uwsgi application using this comment - uwsgi --http :8000 --module XXXX.wsgi --logto /var/www/html/arbllog.log &
  • But we are getting only access log in the corresponding log file. If we enable  debug = True then we are getting both access & error log. But customer will get the python error page. Please let us know how can we achieve this?
2. Performance Optimization
  • What are the parameters we need to include it in uwsgi.ini file inside the application folder. Please share the sample ini file & steps to optimize the python application.
Thanks in advance.



ramadhan ngallen

unread,
Jul 14, 2021, 3:30:13 PM7/14/21
to 'Amitesh Sahay' via Django users, Sethuraman Kannan
On development django handle media/static files usong staticfiles app but on production (debug=False) you have to use server like apache/nginx to handle static files (security reason)

On logger file depends on the way you write you handle how to write log files

On 14 Jul 2021, 16:34 +0300, Senthil Kumar <senthil...@gmail.com>, wrote:
Hi Team,
We are new to Django & Python application. Recently we are migrate from PHP. We are  developed the application in Django / MySQL / UWSGI. 

Please guide us for following items.

1. Enabling Error Page. 
 • We did debug = False. But we are not able to access any media items using the URL. - Please give any suggestion to for both • We are running the uwsgi application using this comment - uwsgi --http :8000 --module XXXX.wsgi --logto /var/www/html/arbllog.log &
 • But we are getting only access log in the corresponding log file. If we enable  debug = True then we are getting both access & error log. But customer will get the python error page. Please let us know how can we achieve this?2. Performance Optimization

 • What are the parameters we need to include it in uwsgi.ini file inside the application folder. Please share the sample ini file & steps to optimize the python application.
Thanks in advance.



 --
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPPQ_igWmAAKv4pCw%3DXYqbfBevFssy-ZQERX7T%3Dpk%3DvzrmNM2w%40mail.gmail.com.

Senthil Kumar

unread,
Jul 15, 2021, 1:50:51 AM7/15/21
to django...@googlegroups.com, Sethuraman Kannan
Hi Ramadhan,

Thanks for your reply. 

It means all media related items should be placed in Apache server (var/www/html/media) path.

Thank you.

Reply all
Reply to author
Forward
0 new messages