test file test file

Import os
 Import SYS 

IF  __name__ == " __main__ " :
     # Django will set a key to global large dictionary when you start the path string value is exposed to the user's profile 
    os.environ.setdefault ( " DJANGO_SETTINGS_MODULE " , " day54.settings " ) 

    Import Django 
    django.setup () 
    from app01 Import Models 
    models.Book.objects.all () 
    # increased

 

Guess you like

Origin www.cnblogs.com/lddragon/p/11546539.html