These are chat archives for django/django

2nd
Apr 2016
Steve Adams
@stevezau
Apr 02 2016 04:07
anyone know how to disable the http GET, POST etc logging when using the dev server??
I've tried to disable django.request logging but its still logging
Filip Figiel
@megapctr
Apr 02 2016 06:01
Why would you do that?
You can redirect output of dev server go dev/null
Or, you can pipe it through an exclusive grep
Steve Adams
@stevezau
Apr 02 2016 06:02
i want the app log not the request logs
Filip Figiel
@megapctr
Apr 02 2016 06:02
Yeah, dev/null wouldn't work
Steve Adams
@stevezau
Apr 02 2016 06:02
it's ok.. i scrapped runserver.. found another way
Filip Figiel
@megapctr
Apr 02 2016 06:02
How?
Steve Adams
@stevezau
Apr 02 2016 06:02
well, not really found another way just did it properly via nginx
its a docker container
Filip Figiel
@megapctr
Apr 02 2016 06:04
Okay
You could also run tail -f on the log file
Steve Adams
@stevezau
Apr 02 2016 06:04
there is no log file
its going to stdout
docker container..
Puneet Aggarwal
@puneetagg
Apr 02 2016 09:43
Hi..
I want to split view file into multiple files, so as to manage them properly. How can I do it?
Joan Ngatia
@JoanNgatia
Apr 02 2016 09:52
@puneetagg you could split the related functions into separate files then use import statements when you require something from a different file.
Puneet Aggarwal
@puneetagg
Apr 02 2016 09:54
@andela-jngatia But the standard app structure is to use views.py. If I use different name, it will not be as per conventions. Is this the only way or there are other ways also to do it?
Joan Ngatia
@JoanNgatia
Apr 02 2016 10:00
For views, you could have a main views folder and inside it the different views as different files..For example I have a views folder and inside it I have a views_authentication.py that handles login and registration for an app.The trick is when creating the URl assign it to the correct view. @puneetagg
Puneet Aggarwal
@puneetagg
Apr 02 2016 10:03
@andela-jngatia Ok..Now I got it. Looks cool. Thanks a lot :smile:
Joan Ngatia
@JoanNgatia
Apr 02 2016 10:06
You're welcome..Anytime :-)
Puneet Aggarwal
@puneetagg
Apr 02 2016 19:15
Hi..I am stuck with one issue.
I am posting a message from front end and a column name of the user table. Before saving the message, I need to fetch the value for that column against that user. I am making use of django rest framework. How do I do that?