OSDLabs / WavesWebsite2016

The official repository of the site of Waves, the annual cultural fest of BITS Pilani, Goa. Made using Django Framework of Python for server side. Includes data porting using REST Framework to JSON to be accessible on the mobile app.
http://bits-waves.org
7 stars 10 forks source link

Not able to start the server ! #9

Closed mukkachaitanya closed 8 years ago

mukkachaitanya commented 8 years ago

The following is the output of python manage.py runserver

(waves) C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\src>python manage.py runserver 0:8000
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\lib\site-packages\django\core\management\__init__.py", line 338, in execute_from_command_line
    utility.execute()
  File "C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\lib\site-packages\django\core\management\__init__.py", line 330, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\lib\site-packages\django\core\management\__init__.py", line 190, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\lib\site-packages\django\core\management\__init__.py", line 40, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "c:\program files (x86)\python2\Lib\importlib\__init__.py", line 37, in import_module
    __import__(name)
  File "C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\lib\site-packages\django\core\management\commands\runserver.py", line 14, in <module>
    from django.db.migrations.executor import MigrationExecutor
  File "C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\lib\site-packages\django\db\migrations\executor.py", line 6, in <module>
    from .loader import MigrationLoader
  File "C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\lib\site-packages\django\db\migrations\loader.py", line 10, in <module>
    from django.db.migrations.recorder import MigrationRecorder
  File "C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\lib\site-packages\django\db\migrations\recorder.py", line 9, in <module>
    class MigrationRecorder(object):
  File "C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\lib\site-packages\django\db\migrations\recorder.py", line 23, in MigrationRecorder
    class Migration(models.Model):
  File "C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\lib\site-packages\django\db\migrations\recorder.py", line 24, in Migration
    app = models.CharField(max_length=255)
  File "C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\lib\site-packages\django\db\models\fields\__init__.py", line 1081, in __init__
    super(CharField, self).__init__(*args, **kwargs)
  File "C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\lib\site-packages\django\db\models\fields\__init__.py", line 161, in __init__
    self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE
  File "C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\lib\site-packages\django\conf\__init__.py", line 48, in __getattr__
    self._setup(name)
  File "C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\lib\site-packages\django\conf\__init__.py", line 44, in _setup
    self._wrapped = Settings(settings_module)
  File "C:\Users\mukka\Documents\Prgm\Waves2k16\Waves-Website\waves\lib\site-packages\django\conf\__init__.py", line 113, in __init__
    raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. ```
mukkachaitanya commented 8 years ago

As I tried to see through the code, the code of /waves/__init__.py :

try:
    from .local import *
except:
    pass

try:
    from .production import *
except:
    pass 

And .local isn't being imported. Tried to change to just local , but same error pops up. Any suggestions ?

SebastinSanty commented 8 years ago

Check if the above patch is working

mukkachaitanya commented 8 years ago

Working and done.