Update django_up.py

fixed some bags