These are chat archives for django/django

25th
Apr 2016
Ramon Moraes
@vyscond
Apr 25 2016 01:18
does anyone here using bsd as server?
Steve Adams
@stevezau
Apr 25 2016 03:11
anyone know how to disable the http logs in django?? can't seem to find a clear answer
Filip Figiel
@megapctr
Apr 25 2016 07:21
@stevezau you mean dev server output? you can't
Steve Adams
@stevezau
Apr 25 2016 07:21
yeah i realised that
thanks :)
Filip Figiel
@megapctr
Apr 25 2016 07:21
you can set up a real server in front of it
Steve Adams
@stevezau
Apr 25 2016 07:22
yep, did that.
Filip Figiel
@megapctr
Apr 25 2016 07:22
but that makes little sense
Steve Adams
@stevezau
Apr 25 2016 07:22
was more for dev/testing. I just piped stout and stderr to dev null and tail a log file
Filip Figiel
@megapctr
Apr 25 2016 07:22
nice!
i personally like to see the http logs. why did you want to disable them?
Steve Adams
@stevezau
Apr 25 2016 07:23
don't care about them for dev..
Michael Gecht
@mimischi
Apr 25 2016 07:24
Quick question about queries: Lets assume I have a blog app with different posts in them. I want a MonthArchiveView which shows me all Blog Posts for a current month. From this view I want to navigate between the next and previous month that has at least one post. I can manage to get all months with posts, but need to iterate and find the next one in Python. Is there any shorter way to do this with a QuerySet or something? Not sure if my approach here would be the fastest one
MonthArchiveView almost solves the problem. It provides previous_month and next_month to the template. But I'd like to use "allow_future" and "allow_empty", so I can show a neat empty page instead of a 404 page. This way both variables still show an empty month as the next/previous one, instead of the next/previous which has content
Mir Nazim
@mnazim
Apr 25 2016 07:35
@mimischi why not just subclass MonthArchiveView and override functionality where 404 is generated.
Michael Gecht
@mimischi
Apr 25 2016 07:41
Have not though about that. Right.
Just to get my thinking straight: What I want to achieve is , when accessing /blog/archive/2016/04/ (which has no post) I want to show basically the same page as for /blog/archive/2016/03/ (which has posts), but only with the message "There are no posts for this month.". Am I overcomplicating things or is this the correct way to go?
Alex Malozemov
@mzval
Apr 25 2016 08:14
Why Django is not my friend?))
Joan Ngatia
@JoanNgatia
Apr 25 2016 09:14
Hello Everyone, I am using React js with Django Rest Framework.Does anyone know how to use Django error messages mashed into React components? something like {% for message in messages %} within a React component?
Alistair Martin
@martalist
Apr 25 2016 10:00
This message was deleted
mpachas
@mpachas
Apr 25 2016 17:22
We are planning our 1.6.x based site refactoring. Should we stop at 1.8.x LTS or try to reach 1.9.5?
Mir Nazim
@mnazim
Apr 25 2016 17:25
@mpachas I would suggest get to 1.8.x first. We did not face any problems going from 1.8 to 1.9 on our fairly large 1.8 Django + DRF app
mpachas
@mpachas
Apr 25 2016 17:49
@mnazim thanks!
Mir Nazim
@mnazim
Apr 25 2016 17:49
:thumbsup:
Christian Hess
@chessbr
Apr 25 2016 20:31
hello folks.. I am using Django 1.8 and I've just created my brand-new app.. do I need to run makemigrations command before deploying my app?
Mir Nazim
@mnazim
Apr 25 2016 20:33
@chessbr yo do, if it has model change; and migrate too.