import os, sys, traceback
sys.path.insert(0, '/home8/xygameco/public_html')
os.environ['DJANGO_SETTINGS_MODULE'] = 'xygaming_core.settings'

import pymysql
pymysql.install_as_MySQLdb()

import django
django.setup()

from django.test import Client
c = Client()

try:
    response = c.get('/admin/login/')
    print('GET /admin/login/ status:', response.status_code)
    if response.status_code >= 500:
        print('Response Content:', response.content[:1000])
except Exception as e:
    print('GET /admin/login/ Exception:', e)
    traceback.print_exc()

try:
    response = c.get('/admin/')
    print('GET /admin/ status:', response.status_code)
except Exception as e:
    print('GET /admin/ Exception:', e)
    traceback.print_exc()
