ngageoint / gamification-server

Server to track gamification elements (badges, points, tags) to work pages or apps
MIT License
243 stars 64 forks source link

Error: paver createdb #5

Open TheOmen opened 9 years ago

TheOmen commented 9 years ago

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

I am now working on a Linux server as nobody seemed to be able to help me in Windows, but I still cannot get this running correctly. Everything seems to work fine until I create the database and then I get the above error.

ballesandro commented 9 years ago

I ran into this same issue as well and fixed it by running export DJANGO_SETTINGS_MODULE="gamification.settings".

TheOmen commented 9 years ago

Thank you ballesandro... your comment has helped me progress a little. However I think the command should have been (this is what I had to change it to get it to work anyway):

export DJANGO_SETTINGS_MODULE=gamification.settings

Now I have a new problem though. When I run the paver createdb, most of the imports work fine, but then it fails and says that it can't find the pinax_theme_bootstrap

Should something really need to be this difficult to setup?

:(

stephenrjones commented 9 years ago

All, I went through the installation and found that several items were missing from the requirements.txt file, which seems to cause most of these issues. I've pushed these changes to my fork, and will look to see if we can get these added to this repository

ballesandro commented 9 years ago

@stephenrjones , I noticed that all of the missing requirements seemed to be listed in gamification-server/requirements.txt while paver used gamification-server/gamification/requirements.txt, if that helps.

sreejithc321 commented 9 years ago

I am getting this error : ImportError: No module named django.contrib.auth.models

---> pavement.createdb Traceback (most recent call last): File "/home/user/pyenv/gamification/local/lib/python2.7/site-packages/paver/tasks.py", line 196, in _run_task return do_task() File "/home/user/pyenv/gamification/local/lib/python2.7/site-packages/paver/tasks.py", line 193, in do_task return func(**kw) File "pavement.py", line 87, in createdb from gamification import settings File "/home/user/Desktop/gamification-server/gamification/init.py", line 3, in from gamification.core.models import Points File "/home/user/Desktop/gamification-server/gamification/core/models.py", line 27, in from django.contrib.auth.models import User ImportError: No module named django.contrib.auth.models