These are chat archives for django/django

12th
Dec 2018
Arunika Yadav
@arunikayadav42
Dec 12 2018 15:56
I wanna learn DRF while building a project ..already well versed with Django
can somebody suggest something?
fsecada01
@fsecada01
Dec 12 2018 15:57
Are you managing data with your Django projects?
Ahsaan-566
@Ahsaan-566
Dec 12 2018 16:35
Hey guys, how do I pass values in a dropdown in django?
fsecada01
@fsecada01
Dec 12 2018 18:51
Hey guys. I'm trying to build a form button to trigger a python function. This function essentially returns a filtered QS and returns the results to a listview. Anyone have any documentation/samples on this?
prog omar ahmed
@omarKady
Dec 12 2018 19:06
python manage.py runserver my-first-site:8000
but i have an Error
Error: [Errno -2] Name or service not known
fsecada01
@fsecada01
Dec 12 2018 19:08
check your settings.py file for SITE_NAME
prog omar ahmed
@omarKady
Dec 12 2018 19:21
ALLOWED_HOSTS = ['my-first-site']
??
@fsecada01
fsecada01
@fsecada01
Dec 12 2018 19:22
No.
SITE_NAME = 'foo'
prog omar ahmed
@omarKady
Dec 12 2018 19:23
i can't find
fsecada01
@fsecada01
Dec 12 2018 19:24
write it below ALLOWED_HOSTS
prog omar ahmed
@omarKady
Dec 12 2018 19:25
ALLOWED_HOSTS = ['my-first-site']
SITE_NAME ='my-first-site'
like this
fsecada01
@fsecada01
Dec 12 2018 19:25
yep! You got it.
prog omar ahmed
@omarKady
Dec 12 2018 19:29
the same error
Error: [Errno -2] Name or service not known
fsecada01
@fsecada01
Dec 12 2018 19:31

It seems like this is tied to your OS's host file, where you declare your IP aliases. Try this instead:

python manage.py runserver 0.0.0.0:8000