Reputation: 1521
I just started using django-cms and am facing issues. I used virtualenv.please help.The following is the error:
Traceback (most recent call last):
File "create_user.py", line 4, in <module>
from django.contrib.auth import get_user_model
File "/home/mayankmodi/SSAD18/Source/env/local/lib/python2.7/site-packages
/django/contrib/auth/__init__.py", line 7, in < module>
from django.middleware.csrf import rotate_token
File "/home/mayankmodi/SSAD18/Source/env/local/lib/python2.7/site-packages
/django/middleware/csrf.py", line 14, in <module>
from django.utils.cache import patch_vary_headers
File "/home/mayankmodi/SSAD18/Source/env/local/lib/python2.7/site-packages/django/utils/cache.py", line 26, in <module>
from django.core.cache import caches
File "/home/mayankmodi/SSAD18/Source/env/local/lib/python2.7/site-packages/django/core/cache/__init__.py", line 34, in <module>
if DEFAULT_CACHE_ALIAS not in settings.CACHES:
File "/home/mayankmodi/SSAD18/Source/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 48, in __getattr__
self._setup(name)
File "/home/mayankmodi/SSAD18/Source/env/local/lib/python2.7/site-packages
/django/conf/__init__.py", line 42, in _setup
% (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: 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.
Can somebody tell me which specific files to edit and what edits should i make
Upvotes: 2
Views: 238
Reputation: 11
I have same problem from a few week ago. I assume the new version(djangocms-installer==0.9.x) have problem because when I created a project using default djangocms-installer(==0.9.0) like "djangcms -p . mysite", there was no questions about DB, django version, or etc, then error...
Try old version "pip install djangocms-installer==0.8.x"(x=12,11,10,...)
Now, I am using "djangocms-installer==0.8.12" without any error.
Upvotes: 1
Reputation: 3426
Try running this command instead:
djangocms -w web
This will start the djangocms-installer wizard and run you through various settings, dependencies, and create a superuser for you to log in with. When it finishes, you should have a running instance of django-cms within ./web/
.
You can access the new instance by going into ./web/
and running runserver
as usual:
$ source venv/bin/activate
(venv) $ python manage.py runserver
Upvotes: 1