In [3]:
import random
import sys
import traceback
import json
from django.db.models import Q
from django.http import HttpResponse, HttpResponseNotFound
from django.shortcuts import render
#excape XSS String
from django.utils.html import escape
from api.models import MonsterPositions


---------------------------------------------------------------------------
ImproperlyConfigured                      Traceback (most recent call last)
<ipython-input-3-99c56105a42c> in <module>()
      8 #excape XSS String
      9 from django.utils.html import escape
---> 10 from api.models import MonsterPositions

/home/lmz/s_square/api/models.py in <module>()
      2 
      3 # Create your models here.
----> 4 class User(models.Model):
      5     uid = models.AutoField(primary_key=True)
      6     uname = models.CharField(max_length=128)

/home/lmz/s_square/api/models.py in User()
      3 # Create your models here.
      4 class User(models.Model):
----> 5     uid = models.AutoField(primary_key=True)
      6     uname = models.CharField(max_length=128)
      7     session = models.CharField(max_length=35,unique=True)

/usr/local/lib/python2.7/dist-packages/django/db/models/fields/__init__.pyc in __init__(self, *args, **kwargs)
    929     def __init__(self, *args, **kwargs):
    930         kwargs['blank'] = True
--> 931         super(AutoField, self).__init__(*args, **kwargs)
    932 
    933     def check(self, **kwargs):

/usr/local/lib/python2.7/dist-packages/django/db/models/fields/__init__.pyc in __init__(self, verbose_name, name, primary_key, max_length, unique, blank, null, db_index, rel, default, editable, serialize, unique_for_date, unique_for_month, unique_for_year, choices, help_text, db_column, db_tablespace, auto_created, validators, error_messages)
    159         self.help_text = help_text
    160         self.db_column = db_column
--> 161         self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE
    162         self.auto_created = auto_created
    163 

/usr/local/lib/python2.7/dist-packages/django/conf/__init__.pyc in __getattr__(self, name)
     46     def __getattr__(self, name):
     47         if self._wrapped is empty:
---> 48             self._setup(name)
     49         return getattr(self._wrapped, name)
     50 

/usr/local/lib/python2.7/dist-packages/django/conf/__init__.pyc in _setup(self, name)
     40                 "You must either define the environment variable %s "
     41                 "or call settings.configure() before accessing settings."
---> 42                 % (desc, ENVIRONMENT_VARIABLE))
     43 
     44         self._wrapped = Settings(settings_module)

ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

In [ ]: