Re: Settings object has no attribute 'ROOT_URLCONF' while deploying using apache and mod_wsgi
On Monday, March 18, 2013 6:17:26 PM UTC+5:30, Tom Evans wrote: > > Hi Navid > > Can you show the structure of your project, where it is on disk and so > on. I suspect that in mysite.wsgi, you are inserting the wrong paths > into sys.path, and then Django cannot find your correct settings. > > > Below are my some config file excerpts: > > (I renamed my actual site name with mysite) > > It can be very hard to determine whether your settings are correct if > you are editing the data you are sending to us. Eg, you have edited > the DJANGO_SETTINGS_MODULE line in your wsgi script, it is not really > 'mysite.settings', since your site is not actually called 'mysite'. > > If you have typos in this line, eg "secretprojectname.settinsg", and > you overwrite that with "mysite.settings" when you send it to us, we > will find it difficult to determine that! Please consider whether the > secret name of your project is worth this amount of hiding! > > Cheers > > Tom > Hi Tom, I appreciate your response to query. Yes, you pointed it right. The issue is resolved now. Let me tell you more context: I am deploying Django site using RPM package. For that I needed a script (which is intended to run from spec file), fetching each line from settings.py and putting same line in mysite.conf file in /etc/httpd/mysite.conf. So the intended process is: settings.py --(each line)--> mysite.conf --(specify same name in spec file as well)---=mysite.conf Mistake I done: settings.py---(each line)--->settings.conf--(specify same name in spec file as well)--=mysite.conf That means, I should have write mysite.conf however I wrote settings.conf (see red color text). That is why actual settings.py was not getting feed, hence leading to mentioned error. I admire your replies folks. Thank you. Regards, Navid Shaikh. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Settings object has no attribute 'ROOT_URLCONF' while deploying using apache and mod_wsgi
On Sunday, March 17, 2013 7:49:31 PM UTC+5:30, JirkaV wrote: > > I'd look at how you reference your settings during imports. The error > message spells "Settings" with uppercase "S" which feels incorrect. > > Hi Jirka, I appreciate your response. This is default behavior (I am not sure whether to call it bug) for reporting error. There is no such matter of "S" in in error log. The issue get resolved, please refer the following reply by me in same thread. Regards, Navid Shaikh -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Settings object has no attribute 'ROOT_URLCONF' while deploying using apache and mod_wsgi
On Sun, Mar 17, 2013 at 9:20 AM, Navid Shaikh <shaikhnavi...@gmail.com> wrote: > Hi folks, > > (Before posting I searched in archive and the question is kind of similar to > thread [1].) > > I am getting error: > AttributeError: 'Settings' object has no attribute 'ROOT_URLCONF' Hi Navid Can you show the structure of your project, where it is on disk and so on. I suspect that in mysite.wsgi, you are inserting the wrong paths into sys.path, and then Django cannot find your correct settings. > Below are my some config file excerpts: > (I renamed my actual site name with mysite) It can be very hard to determine whether your settings are correct if you are editing the data you are sending to us. Eg, you have edited the DJANGO_SETTINGS_MODULE line in your wsgi script, it is not really 'mysite.settings', since your site is not actually called 'mysite'. If you have typos in this line, eg "secretprojectname.settinsg", and you overwrite that with "mysite.settings" when you send it to us, we will find it difficult to determine that! Please consider whether the secret name of your project is worth this amount of hiding! Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Settings object has no attribute 'ROOT_URLCONF' while deploying using apache and mod_wsgi
I'd look at how you reference your settings during imports. The error message spells "Settings" with uppercase "S" which feels incorrect. HTH Jirka -Original Message- From: Navid Shaikh <shaikhnavi...@gmail.com> Sender: django-users@googlegroups.com Date: Sun, 17 Mar 2013 02:20:29 To: <django-users@googlegroups.com> Reply-To: django-users@googlegroups.com Subject: Settings object has no attribute 'ROOT_URLCONF' while deploying using apache and mod_wsgi Hi folks, (Before posting I searched in archive and the question is kind of similar to thread [1].) I am getting error: AttributeError: 'Settings' object has no attribute 'ROOT_URLCONF' I am using a) Django version 1.3.2. b) Apache c) mod_wsgi I followed standard Django docs [2] to implement configurations. Below are my some config file excerpts: (I renamed my actual site name with mysite) mysite-httpd.conf (filename) - WSGIScriptAlias / "/usr/share/slate/apache/mysite.wsgi" - mysite.wsgi (filename) -- #!/usr/bin/python # # For Apache mod_wsgi. import os import sys path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(path) # /usr/share/slate/ sys.path.append(os.path.dirname(path)) # /usr/share/ os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() -- After reading thread[1] , I think that there is problem in setting 'DJANGO_SETTINGS_MODULE', as I have 'ROOT_URLCONF variable set in settings.py. Please point out where I am doing it wrong. Links: [1] http://www.mail-archive.com/django-users@googlegroups.com/msg28764.html [2] https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/ Thanks and Regards, Navid Shaikh. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Settings object has no attribute 'ROOT_URLCONF' while deploying using apache and mod_wsgi
Hi folks, (Before posting I searched in archive and the question is kind of similar to thread [1].) I am getting error: AttributeError: 'Settings' object has no attribute 'ROOT_URLCONF' I am using a) Django version 1.3.2. b) Apache c) mod_wsgi I followed standard Django docs [2] to implement configurations. Below are my some config file excerpts: (I renamed my actual site name with mysite) mysite-httpd.conf (filename) - WSGIScriptAlias / "/usr/share/slate/apache/mysite.wsgi" - mysite.wsgi (filename) -- #!/usr/bin/python # # For Apache mod_wsgi. import os import sys path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(path) # /usr/share/slate/ sys.path.append(os.path.dirname(path)) # /usr/share/ os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() -- After reading thread[1] , I think that there is problem in setting 'DJANGO_SETTINGS_MODULE', as I have 'ROOT_URLCONF variable set in settings.py. Please point out where I am doing it wrong. Links: [1] http://www.mail-archive.com/django-users@googlegroups.com/msg28764.html [2] https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/ Thanks and Regards, Navid Shaikh. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: 'Settings' object has no attribute 'ROOT_URLCONF'
solved, i uninstalled both python and django and then installed them again, now it is working... i think it was a misunderstanding for OS as it had several versions of django installed several times and it got confused may be... anyway.. for those who will meet the problem, this advice is given.. Am Samstag, 19. Mai 2012 07:52:58 UTC+2 schrieb doniyor: > > Hi > > i have this problem, i dont why, i have root_urlconf in my settings.py. i > cannot figure out what it wants from me.. pls help > > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/aAxIsZsc08UJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
'Settings' object has no attribute 'ROOT_URLCONF'
Hi i have this problem, i dont why, i have root_urlconf in my settings.py. i cannot figure out what it wants from me.. pls help -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/99LNudLYYB4J. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Settings object has no attribute 'ROOT_URLCONF': what does this message mean?
That's it! I was going crazy looking inside the settings.py, and the problem was in the httpd.conf, that I assumed was correct :) Thanks a lot! On Jun 6, 5:10 pm, "Deryck Hodge" <[EMAIL PROTECTED]> wrote: > On 6/6/07, ilDave <[EMAIL PROTECTED]> wrote: > > > > > The line is there, inside the settings.py > > It looks like > > ROOT_URLCONF = 'testdrorys.urls' > > ('testdrorys' is the name of my project) > > and the file urls.py is in the same directory as settings.py > > > I'm getting confused... > > On a second look, given what you just said, you may have an error in > your Apache config. Should this: > > SetEnv DJANGO_SETTINGS_MODULE testdrorys.etichette > > be this: > > SetEnv DJANGO_SETTINGS_MODULE testdrorys.settings ? > > Cheers, > deryck --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Settings object has no attribute 'ROOT_URLCONF': what does this message mean?
On 6/6/07, ilDave <[EMAIL PROTECTED]> wrote: > > The line is there, inside the settings.py > It looks like > ROOT_URLCONF = 'testdrorys.urls' > ('testdrorys' is the name of my project) > and the file urls.py is in the same directory as settings.py > > I'm getting confused... On a second look, given what you just said, you may have an error in your Apache config. Should this: SetEnv DJANGO_SETTINGS_MODULE testdrorys.etichette be this: SetEnv DJANGO_SETTINGS_MODULE testdrorys.settings ? Cheers, deryck --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Settings object has no attribute 'ROOT_URLCONF': what does this message mean?
The line is there, inside the settings.py It looks like ROOT_URLCONF = 'testdrorys.urls' ('testdrorys' is the name of my project) and the file urls.py is in the same directory as settings.py I'm getting confused... On Jun 6, 4:56 pm, "Deryck Hodge" <[EMAIL PROTECTED]> wrote: > On 6/6/07, ilDave <[EMAIL PROTECTED]> wrote: > > > AttributeError: 'Settings' object has no attribute 'ROOT_URLCONF' > > > What's wrong with my configuration? It seem that python can't find the > > urls.py file, but it is in the right place and everything is readable > > by apache... > > Your settings file should have a line like the following: > > ROOT_URLCONF = 'myproject.urls' > > That's how Django knows where to look for urls.py. It should be in > dotted Python syntax according to where it falls on the Python Path. > So the above assumes "myporject" is on your Python path and that > urls.py lives inside the myproject directory. > > Cheers, > deryck --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Settings object has no attribute 'ROOT_URLCONF': what does this message mean?
On 6/6/07, ilDave <[EMAIL PROTECTED]> wrote: > AttributeError: 'Settings' object has no attribute 'ROOT_URLCONF' > > > What's wrong with my configuration? It seem that python can't find the > urls.py file, but it is in the right place and everything is readable > by apache... > Your settings file should have a line like the following: ROOT_URLCONF = 'myproject.urls' That's how Django knows where to look for urls.py. It should be in dotted Python syntax according to where it falls on the Python Path. So the above assumes "myporject" is on your Python path and that urls.py lives inside the myproject directory. Cheers, deryck --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Settings object has no attribute 'ROOT_URLCONF': what does this message mean?
Hi all, I'm trying to set up a new django app under Apache and mod_python. I created a new project called 'testdrorys', and inside it a new app called 'etichette'. The full path of my project is /var/www/html/testdrorys/testdrorys/myapp The first testdrorys dir is the main directory of the project, and the second is the directory created by django-admin.py. Then I modified the httpd.conf adding the following lines: SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE testdrorys.etichette PythonPath "['/var/www/html/testdrorys/'] + sys.path" PythonDebug On I addedd django.contrib.admin and myproject.myapp to the INSTALLED_APPS in settings.py, I synced the database and everything worked fine, the authentication and the user tables where created succesfully. Then, I tried to load http://localhost/etichette/ in the browser, and I had the following errors: MOD_PYTHON ERROR ProcessId: 8630 Interpreter:'testdrorys.colorit.net' ServerName: 'testdrorys.colorit.net' DocumentRoot: '/var/www/html/testdrorys' URI:'/etichette/admin/' Location: '/etichette/' Directory: None Filename: '/var/www/html/testdrorys/etichette' PathInfo: '/admin/' Phase: 'PythonHandler' Handler:'django.core.handlers.modpython' Traceback (most recent call last): File "/usr/local/lib/python2.5/site-packages/mod_python/ importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "/usr/local/lib/python2.5/site-packages/mod_python/ importer.py", line 1229, in _process_target result = _execute_target(config, req, object, arg) File "/usr/local/lib/python2.5/site-packages/mod_python/ importer.py", line 1128, in _execute_target result = object(arg) File "/usr/local/lib/python2.5/site-packages/django/core/handlers/ modpython.py", line 177, in handler return ModPythonHandler()(req) File "/usr/local/lib/python2.5/site-packages/django/core/handlers/ modpython.py", line 150, in __call__ response = self.get_response(request) File "/usr/local/lib/python2.5/site-packages/django/core/handlers/ base.py", line 64, in get_response urlconf = getattr(request, "urlconf", settings.ROOT_URLCONF) File "/usr/local/lib/python2.5/site-packages/django/conf/ __init__.py", line 32, in __getattr__ return getattr(self._target, name) AttributeError: 'Settings' object has no attribute 'ROOT_URLCONF' What's wrong with my configuration? It seem that python can't find the urls.py file, but it is in the right place and everything is readable by apache... Any suggestions? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---