These are chat archives for django/django

27th
Sep 2017
bugdiscloseguys
@bugdiscloseguys
Sep 27 2017 03:01 UTC
How to start in django?
Renjith S Raj
@renjithsraj
Sep 27 2017 07:50 UTC
@63phc , yes please
Renjith S Raj
@renjithsraj
Sep 27 2017 07:58 UTC

@bugdiscloseguys

Build something. Anything. Keep it relatively simple and short, but start building it and make sure you finish building it. The project you have in mind right there might be perfect.

Reading documentation and books is extremely helpful, of course, but like any programming the only way to really learn Django is to practice with it. Building something tangible is pretty much the only way to get that practice.
follow the links
django offical doc : https://docs.djangoproject.com/en/1.11/
Learn Like A KID ... You will make awesome ... :smile:

matrixbot
@matrixbot
Sep 27 2017 16:54 UTC

@sedrubal:matrix.org Since some weeks django crashes from time to time with the message

Invalid HTTP_HOST header: ''. The domain name provided is not valid according to RFC 1034/1035.

I can reproduce, that Django is crashing if the host header is empty:

echo 'GET / HTTP/1.1
Host: 
' | openssl s_client -connect <domain>:443

The client receives a valid 400 Bad Request. But why does Apache forward this bad request to Django and why does Django crash?

Luke-VideoLibre
@LukeVideo
Sep 27 2017 18:45 UTC
@bugdiscloseguys go though the poll app tutorial on the official documentation. That's a good start.
Ihor
@fatalispm
Sep 27 2017 19:01 UTC
Hi, can someone please help with Django ORM? I need to make multiple group by-s in one query and then join the results
It that even possible?
sachi842
@sachi842
Sep 27 2017 19:19 UTC
hello
has anyone worked with odoo deployed with docker?
Renjith S Raj
@renjithsraj
Sep 27 2017 19:20 UTC
@fatalispm yes its possible.
Ihor
@fatalispm
Sep 27 2017 19:20 UTC
How?
Here is a question
Renjith S Raj
@renjithsraj
Sep 27 2017 19:20 UTC
will check it
Ihor
@fatalispm
Sep 27 2017 19:21 UTC
Thanks
Renjith S Raj
@renjithsraj
Sep 27 2017 19:22 UTC
can you tell me the words what the query. i mean Models details
Ihor
@fatalispm
Sep 27 2017 19:23 UTC
There is only one model that's used there
We can simplify it to 3 fields
user_id
amount
category
Need to get:
user_id sum(amount for category1) sum(amount for category 2)
Categories are limited
Renjith S Raj
@renjithsraj
Sep 27 2017 19:33 UTC
not getting .
Ihor
@fatalispm
Sep 27 2017 19:33 UTC
Suppose we have Orders model
With user_id amount category

1 10 'pizza'
1 15 'pizza'
1 20 'ham'

We want to have amount user had for two categories(hardcoded)

We got:
1 25 20

matrixbot
@matrixbot
Sep 27 2017 22:40 UTC
@bignose:matrix.org Waiting For #Django blog has begun! First post discusses the mobile-friendly admin site.
https://waitingfordjango.org/2017/09/here-comes-django-20.html
@bignose:matrix.org Waiting For Django blog has begun! First post discusses the mobile-friendly admin site.
https://waitingfordjango.org/2017/09/here-comes-django-20.html