You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
is it normal that the settings file is being imported four times? I'd give more info, but I really have no clue what's going on
here's my manage.py:
from django.core.management import execute_manager import imp try: imp.find_module('local_settings') # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("""Error: Can't find the file 'local_settings.py' in the directory containing %r. It appears you've customized things. You'll have to run django-admin.py, passing it your settings module. (If the file local_settings.py does indeed exist, it's causing an ImportError somehow.) """ % __file__) sys.exit(1)
import local_settings
if __name__ == '__main__': execute_manager(local_settings)
And I printed a stacktrace at the top of my local_settings file. It does a 'from settings import *' at the top.
lacrymology@Roller:boilerplate$ ./manage.py runserver local_settings File "./manage.py", line 15, in <module> import local_settings File "/home/lacrymology/workspace/django/groupsolo/boilerplate/boilerplate/local_settings.py", line 4, in <module> traceback.print_stack() ############################################### local_settings File "./manage.py", line 18, in <module> execute_manager(local_settings) File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager utility.execute() File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 252, in fetch_command app_name = get_commands()[subcommand] File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 101, in get_commands apps = settings.INSTALLED_APPS File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/utils/functional.py", line 276, in __getattr__ self._setup() File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 42, in _setup self._wrapped = Settings(settings_module) File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 87, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/home/lacrymology/workspace/django/groupsolo/boilerplate/boilerplate/../boilerplate/local_settings.py", line 4, in <module> traceback.print_stack() ############################################### No handlers could be found for logger "keyedcache" local_settings File "./manage.py", line 15, in <module> import local_settings File "/home/lacrymology/workspace/django/groupsolo/boilerplate/boilerplate/local_settings.py", line 4, in <module> traceback.print_stack() ############################################### local_settings File "./manage.py", line 18, in <module> execute_manager(local_settings) File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager utility.execute() File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 252, in fetch_command app_name = get_commands()[subcommand] File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 101, in get_commands apps = settings.INSTALLED_APPS File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/utils/functional.py", line 276, in __getattr__ self._setup() File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 42, in _setup self._wrapped = Settings(settings_module) File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/conf/__init__.py", line 87, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/home/lacrymology/workspace/django/groupsolo/boilerplate/env/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/home/lacrymology/workspace/django/groupsolo/boilerplate/boilerplate/../boilerplate/local_settings.py", line 4, in <module> traceback.print_stack() ############################################### No handlers could be found for logger "keyedcache" Validating models...
modeltranslation: Registered 1 models for translation (Entry). 0 errors found Django version 1.3.1, using settings 'boilerplate.local_settings' Development server is running at http://127.0.0.1:8000/ Quit the server with CONTROL-C.
-- "The whole of Japan is pure invention. There is no such country, there are no such people" --Oscar Wilde
|_|0|_| |_|_|0| |0|0|0|
(\__/) (='.'=)This is Bunny. Copy and paste bunny (")_(") to help him gain world domination.
Jon Paugh
unread,
May 16, 2012, 8:33:15 PM5/16/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Yes, when I put a print statement in my settings file, it prints out twice everytime I start the server. The file has to be imported in multiple places, and so it gets executed multiple times. I'm not sure what your error is, but it doesn't seem to be related to the multiple imports.
Russell Keith-Magee
unread,
May 16, 2012, 9:26:59 PM5/16/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django...@googlegroups.com
Hi Tomas,
If you're using Django 1.3, and you're using the development server
(which it looks like you are), then yes, it's normal. See: