Try-Django-1.11 icon indicating copy to clipboard operation
Try-Django-1.11 copied to clipboard

get bad request on server

Open roestigraben opened this issue 8 years ago • 7 comments
trafficstars

Hello, I cloned the project after the login view onto my Mac and did some checks like:

  • running the shell and seeing if i.e. Restaurantlocation.objects.all() did show. OK
  • ran the python manage.py makemigrations. No migrations were done
  • ran the python manage.py migrate. No migrations to apply Then I ran the server which gave me "bad requests" or ""GET /admin HTTP/1.1" 400 26"

I did do in another project pretty much the same code following the tutorial on youtube which went OK.

I am a little lost as this is my first attempt into Django (I am more a Angular guy ;-)

Thanks

roestigraben avatar Jul 25 '17 20:07 roestigraben

Hello roestigraben, Even i tried the HTTP even i got the same error can some one help with it since i am new to the django.

chanduchowdary avatar Jul 27 '17 19:07 chanduchowdary

Also cloned and getting the same error when trying to access localhost:8000

sebstr1 avatar Aug 05 '17 13:08 sebstr1

Need to change settings from production to local

lowjumpingfrog avatar Nov 26 '17 21:11 lowjumpingfrog

how i can do this? changing the settings from production to local?

ghost avatar Dec 08 '17 15:12 ghost

show bad requset 404 to runserver 127.0.0.1:8000 ,tell me change pls tks

Gaojunsu avatar Dec 11 '17 04:12 Gaojunsu

you need to use the muypicky/settings/base.py settings in the settings module comment out importing the production.py file like so ....

from .base import *

#from .production import *

try:
   from .local2 import *
except:
   pass

you will have to craft this file to suite your production environment. Watch the video to see how the author's production environment is set up and how he uses git to push the correct files to production.

lowjumpingfrog avatar Dec 11 '17 04:12 lowjumpingfrog

actually, it is the file: muypicky/setting/init.py

NightHawk451 avatar Jan 29 '18 00:01 NightHawk451