Re: ImproperlyConfigured:

2021-06-30 Thread Abdoulaye Koumaré
You need to install psycopg2 to use PostgreSQL run the command below from 
your terminal

pip install psycopg2

On Tuesday, 29 June 2021 at 12:35:23 UTC ypa...@sapat.com wrote:

> Watching for file changes with StatReloader
> Exception in thread django-main-thread:
> Traceback (most recent call last):
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/backends/postgresql/base.py",
>  
> line 25, in 
> import psycopg2 as Database
> ModuleNotFoundError: No module named 'psycopg2'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
> self.run()
>   File "/usr/lib64/python3.6/threading.py", line 864, in run
> self._target(*self._args, **self._kwargs)
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/utils/autoreload.py",
>  
> line 64, in wrapper
> fn(*args, **kwargs)
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/core/management/commands/runserver.py",
>  
> line 110, in inner_run
> autoreload.raise_last_exception()
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/utils/autoreload.py",
>  
> line 87, in raise_last_exception
> raise _exception[1]
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/core/management/__init__.py",
>  
> line 375, in execute
> autoreload.check_errors(django.setup)()
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/utils/autoreload.py",
>  
> line 64, in wrapper
> fn(*args, **kwargs)
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/__init__.py",
>  
> line 24, in setup
> apps.populate(settings.INSTALLED_APPS)
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/apps/registry.py",
>  
> line 114, in populate
> app_config.import_models()
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/apps/config.py",
>  
> line 301, in import_models
> self.models_module = import_module(models_module_name)
>   File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in 
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 994, in _gcd_import
>   File "", line 971, in _find_and_load
>   File "", line 955, in 
> _find_and_load_unlocked
>   File "", line 665, in _load_unlocked
>   File "", line 678, in exec_module
>   File "", line 219, in 
> _call_with_frames_removed
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/contrib/auth/models.py",
>  
> line 3, in 
> from django.contrib.auth.base_user import AbstractBaseUser, 
> BaseUserManager
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/contrib/auth/base_user.py",
>  
> line 48, in 
> class AbstractBaseUser(models.Model):
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/models/base.py",
>  
> line 122, in __new__
> new_class.add_to_class('_meta', Options(meta, app_label))
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/models/base.py",
>  
> line 326, in add_to_class
> value.contribute_to_class(cls, name)
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/models/options.py",
>  
> line 207, in contribute_to_class
> self.db_table = truncate_name(self.db_table, 
> connection.ops.max_name_length())
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/utils/connection.py",
>  
> line 15, in __getattr__
> return getattr(self._connections[self._alias], item)
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/utils/connection.py",
>  
> line 62, in __getitem__
> conn = self.create_connection(alias)
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/utils.py",
>  
> line 204, in create_connection
> backend = load_backend(db['ENGINE'])
>   File 
> "/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/utils.py",
>  
> line 111, in load_backend
> return import_module('%s.base' % backend_name)
>   File "/usr/lib64/python3.6/importlib/__init__.py&

ImproperlyConfigured:

2021-06-29 Thread Yogesh Pawar
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/backends/postgresql/base.py",
 
line 25, in 
import psycopg2 as Database
ModuleNotFoundError: No module named 'psycopg2'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
  File "/usr/lib64/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/utils/autoreload.py",
 
line 64, in wrapper
fn(*args, **kwargs)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/core/management/commands/runserver.py",
 
line 110, in inner_run
autoreload.raise_last_exception()
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/utils/autoreload.py",
 
line 87, in raise_last_exception
raise _exception[1]
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/core/management/__init__.py",
 
line 375, in execute
autoreload.check_errors(django.setup)()
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/utils/autoreload.py",
 
line 64, in wrapper
fn(*args, **kwargs)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/__init__.py",
 
line 24, in setup
apps.populate(settings.INSTALLED_APPS)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/apps/registry.py",
 
line 114, in populate
app_config.import_models()
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/apps/config.py",
 
line 301, in import_models
self.models_module = import_module(models_module_name)
  File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 994, in _gcd_import
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File "", line 678, in exec_module
  File "", line 219, in 
_call_with_frames_removed
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/contrib/auth/models.py",
 
line 3, in 
from django.contrib.auth.base_user import AbstractBaseUser, 
BaseUserManager
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/contrib/auth/base_user.py",
 
line 48, in 
class AbstractBaseUser(models.Model):
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/models/base.py",
 
line 122, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/models/base.py",
 
line 326, in add_to_class
value.contribute_to_class(cls, name)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/models/options.py",
 
line 207, in contribute_to_class
self.db_table = truncate_name(self.db_table, 
connection.ops.max_name_length())
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/utils/connection.py",
 
line 15, in __getattr__
return getattr(self._connections[self._alias], item)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/utils/connection.py",
 
line 62, in __getitem__
conn = self.create_connection(alias)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/utils.py",
 
line 204, in create_connection
backend = load_backend(db['ENGINE'])
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/utils.py",
 
line 111, in load_backend
return import_module('%s.base' % backend_name)
  File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in 
import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File 
"/home/yogesh/mydjango/djangoenv/lib/python3.6/site-packages/django/db/backends/postgresql/base.py",
 
line 29, in 
raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: 
No module named 'psycopg2'

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3081a265-c922-4f90-885b-3a218046e93bn%40googlegroups.com.


Re: Django 11 ImproperlyConfigured: AUTH_USER_MODEL refers to model 'authex.UserProfile' that has not been installed

2017-10-30 Thread cjacquemet
Ok, i finally found where the problem was : the admin class (UserAdmin) of 
my custom user class was in models.py and must be in admin.py.

I found the solution here : 
https://stackoverflow.com/questions/45783147/django-lookuperror-app-accounts-doesnt-have-a-user-model

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d8576cab-0218-4c7a-9935-a2d17b842b83%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 11 ImproperlyConfigured: AUTH_USER_MODEL refers to model 'authex.UserProfile' that has not been installed

2017-10-30 Thread cjacquemet
An additional information : the settings.py was generated with Django 1.9.7

Le lundi 30 octobre 2017 08:35:44 UTC+1, cjacq...@gmail.com a écrit :
>
>
> Yes, there is my INSTALLED_APPS (it was ok with Django 1.10) :
>
> INSTALLED_APPS = [
> #django
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> 'django.contrib.sites',
> 'django.contrib.flatpages',
> 'django.contrib.humanize',
> #third-parties
> 'bootstrapform',
> 'django_bleach',
> 'django_tables2',
> 'easy_thumbnails',
> 'emoticons',
> 'form_utils',
> 'mathfilters',
> 'tinymce',
> #assoweb
> 'airfield',
> 'authex',
> 'blog',
> 'challenge',
> 'core',
> 'django_resource',
> 'files',
> 'help',
> 'mailing',
> 'questionnaire',
> 'section',
> 'treasury',
> 'year',
> ]
>
>
> And later :
>
> AUTH_USER_MODEL = 'authex.UserProfile'
>
>
> Thanks for helping. :)
>
> Le lundi 30 octobre 2017 07:56:48 UTC+1, James Schneider a écrit :
>>
>>   File "/Library/Python/2.7/site-packages/django/contrib/auth/forms.py", 
>>> line 22, in 
>>> UserModel = get_user_model()
>>>   File 
>>> "/Library/Python/2.7/site-packages/django/contrib/auth/__init__.py", line 
>>> 198, in get_user_model
>>> "AUTH_USER_MODEL refers to model '%s' that has not been installed" % 
>>> settings.AUTH_USER_MODEL
>>> django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to 
>>> model 'authex.UserProfile' that has not been installed
>>>
>>>
>>> Any ideas ? Thanks !
>>>
>>>
>> Does INSTALLED_APPS in your settings.py file contain an entry 
>> for 'authex'? 
>>
>> -James
>>
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bb671a1c-fa4d-4938-888f-dab8984bc1e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 11 ImproperlyConfigured: AUTH_USER_MODEL refers to model 'authex.UserProfile' that has not been installed

2017-10-30 Thread cjacquemet

Yes, there is my INSTALLED_APPS (it was ok with Django 1.10) :

INSTALLED_APPS = [
#django
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'django.contrib.flatpages',
'django.contrib.humanize',
#third-parties
'bootstrapform',
'django_bleach',
'django_tables2',
'easy_thumbnails',
'emoticons',
'form_utils',
'mathfilters',
'tinymce',
#assoweb
'airfield',
'authex',
'blog',
'challenge',
'core',
'django_resource',
'files',
'help',
'mailing',
'questionnaire',
'section',
'treasury',
'year',
]


And later :

AUTH_USER_MODEL = 'authex.UserProfile'


Thanks for helping. :)

Le lundi 30 octobre 2017 07:56:48 UTC+1, James Schneider a écrit :
>
>   File "/Library/Python/2.7/site-packages/django/contrib/auth/forms.py", 
>> line 22, in 
>> UserModel = get_user_model()
>>   File 
>> "/Library/Python/2.7/site-packages/django/contrib/auth/__init__.py", line 
>> 198, in get_user_model
>> "AUTH_USER_MODEL refers to model '%s' that has not been installed" % 
>> settings.AUTH_USER_MODEL
>> django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to 
>> model 'authex.UserProfile' that has not been installed
>>
>>
>> Any ideas ? Thanks !
>>
>>
> Does INSTALLED_APPS in your settings.py file contain an entry 
> for 'authex'? 
>
> -James
>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/37b729c3-f096-45bb-aab0-a7328d133585%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 11 ImproperlyConfigured: AUTH_USER_MODEL refers to model 'authex.UserProfile' that has not been installed

2017-10-30 Thread James Schneider
>
>   File "/Library/Python/2.7/site-packages/django/contrib/auth/forms.py",
> line 22, in 
> UserModel = get_user_model()
>   File "/Library/Python/2.7/site-packages/django/contrib/auth/__init__.py",
> line 198, in get_user_model
> "AUTH_USER_MODEL refers to model '%s' that has not been installed" %
> settings.AUTH_USER_MODEL
> django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to
> model 'authex.UserProfile' that has not been installed
>
>
> Any ideas ? Thanks !
>
>
Does INSTALLED_APPS in your settings.py file contain an entry for 'authex'?

-James

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciXaOovzY%3DM455AcmAM5H4jbffYT9F_%3DxsTDgMjxtS4h7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django 11 ImproperlyConfigured: AUTH_USER_MODEL refers to model 'authex.UserProfile' that has not been installed

2017-10-29 Thread cjacquemet
Hi everyone,

I'm trying to update Django from 1.10.8 to 1.11.6 but it raise me an error.

I just update Django with pip. I use Python 2.7.11 and Mac OS X and 
everything was working on Django 1.10.8.


Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 
228, in wrapper
fn(*args, **kwargs)
  File 
"/Library/Python/2.7/site-packages/django/core/management/commands/runserver.py",
 
line 117, in inner_run
autoreload.raise_last_exception()
  File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 
251, in raise_last_exception
six.reraise(*_exception)
  File "/Library/Python/2.7/site-packages/django/utils/autoreload.py", line 
228, in wrapper
fn(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/django/__init__.py", line 27, in 
setup
apps.populate(settings.INSTALLED_APPS)
  File "/Library/Python/2.7/site-packages/django/apps/registry.py", line 
108, in populate
app_config.import_models()
  File "/Library/Python/2.7/site-packages/django/apps/config.py", line 202, 
in import_models
self.models_module = import_module(models_module_name)
  File 
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py",
 
line 37, in import_module
__import__(name)
  File "/Users/Colas/PyCharmProjects/assoweb/authex/models.py", line 6, in 

from django.contrib.auth.admin import UserAdmin
  File "/Library/Python/2.7/site-packages/django/contrib/auth/admin.py", 
line 7, in 
from django.contrib.auth.forms import (
  File "/Library/Python/2.7/site-packages/django/contrib/auth/forms.py", 
line 22, in 
UserModel = get_user_model()
  File "/Library/Python/2.7/site-packages/django/contrib/auth/__init__.py", 
line 198, in get_user_model
"AUTH_USER_MODEL refers to model '%s' that has not been installed" % 
settings.AUTH_USER_MODEL
django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to 
model 'authex.UserProfile' that has not been installed


Any ideas ? Thanks !

Colas

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e10c7aef-1bd0-40dd-b899-9b707f085b12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Upgrade to django 1.7- ImproperlyConfigured -Tastypie label duplicate? help

2016-01-25 Thread amarshall
Been a while.I forgot if I solved it using that. However I did create 
different environments using env wrapper and do an uninstall of old django 
and complete install to the newest version. Fixing small errors as they 
arise.

On Saturday, May 30, 2015 at 10:21:45 AM UTC-4, dc wrote:
>
> Were you able to solve the problem @amarshall? I have the exact same 
> error, do let me know please!
>
> On Tuesday, March 31, 2015 at 8:04:23 PM UTC+5:30, Filipe Ximenes wrote:
>>
>> Thats strange.
>> Are you using pip to install dependencies? Try uninstalling everything 
>> and reinstalling again. 
>> Make sure INSTALLED_APPS is not being defined somewhere else in the code. 
>> Does the error persists if you set DEBUG = False locally?
>>
>> On Tue, Mar 31, 2015 at 10:21 AM, amarshall  wrote:
>>
>>> Hi Filipe,
>>>
>>> I have few apps installed. When I comment out the tastypie line my app 
>>> builds but gets an error in production because tastypie app isn't found. 
>>> Here it is:
>>>
>>> INSTALLED_APPS = (
>>> 'django.contrib.admin',
>>> 'django.contrib.auth',
>>> 'django.contrib.contenttypes',
>>> 'django.contrib.sessions',
>>> 'django.contrib.messages',
>>> 'django.contrib.staticfiles',
>>> 'rest_framework',
>>># 'south',   // commented out after upgrade to Django 1.7
>>> 'tastypie',
>>> 'lokal',#my app
>>> )
>>>
>>>
>>>
>>> On Tuesday, March 31, 2015 at 5:52:55 AM UTC-4, Filipe Ximenes wrote:

 Can you show us your INSTALED_APPS?
 It may be the case you have a lot of apps installed and is not seeing a 
 duplicate reference to tastypie.
 On Mar 29, 2015 9:43 PM, "amarshall"  wrote:

> Hi,
>
>  So I updated my django project from django 1.6 to 1.7.7 and when I 
> run "python manage.py migrate" I get this error stating that I have a 
> duplicate label. 
>
> Here's the traceback
>
>   Creating tables...
>   Installing custom SQL...
>   Installing indexes...
> Running migrations:
>   Applying tastypie.0001_initial...Traceback (most recent call last):
>   File "manage.py", line 11, in 
> execute_from_command_line(sys.argv)
>   File "/usr/local/lib/python2.7/dist-packages/django/core/
> management/__init__.py", line 385, in execute_from_command_line
> utility.execute()
>   File "/usr/local/lib/python2.7/dist-packages/django/core/
> management/__init__.py", line 377, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/usr/local/lib/python2.7/dist-packages/django/core/
> management/base.py", line 288, in run_from_argv
> self.execute(*args, **options.__dict__)
>   File "/usr/local/lib/python2.7/dist-packages/django/core/
> management/base.py", line 338, in execute
> output = self.handle(*args, **options)
>   File "/usr/local/lib/python2.7/dist-packages/django/core/
> management/commands/migrate.py", line 161, in handle
> executor.migrate(targets, plan, fake=options.get("fake", False))
>   File "/usr/local/lib/python2.7/dist-packages/django/db/
> migrations/executor.py", line 68, in migrate
> self.apply_migration(migration, fake=fake)
>   File "/usr/local/lib/python2.7/dist-packages/django/db/
> migrations/executor.py", line 96, in apply_migration
> if self.detect_soft_applied(migration):
>   File "/usr/local/lib/python2.7/dist-packages/django/db/
> migrations/executor.py", line 140, in detect_soft_applied
> apps = project_state.render()
>   File "/usr/local/lib/python2.7/dist-packages/django/db/
> migrations/state.py", line 57, in render
> self.apps = Apps([AppConfigStub(label) for label in 
> sorted(self.real_apps 
> + list(app_labels))])
>   File "/usr/local/lib/python2.7/dist-packages/django/apps/
> registry.py", line 56, in __init__
> self.populate(installed_apps)
>   File "/usr/local/lib/python2.7/dist-packages/django/apps/
> registry.py", line 89, in populate
> "duplicates: %s" % app_config.label)
> django.core.exceptions.ImproperlyConfigured: Application labels aren't 
> unique, duplicates: tastypie
>
>
> Not sure what to do here. I remove tastypie from the list of 
> INSTALLED_APPS in my settings and everything works fine. but I do need 
> it. 
> Any suggestions ?
>
> -- 
> 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...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/7e4cfbf8-d3e0-4e0e-a38c-b83930ffa3b6%
> 

Re: Upgrade to django 1.7- ImproperlyConfigured -Tastypie label duplicate? help

2015-05-30 Thread dc
Were you able to solve the problem @amarshall? I have the exact same error, 
do let me know please!

On Tuesday, March 31, 2015 at 8:04:23 PM UTC+5:30, Filipe Ximenes wrote:
>
> Thats strange.
> Are you using pip to install dependencies? Try uninstalling everything and 
> reinstalling again. 
> Make sure INSTALLED_APPS is not being defined somewhere else in the code. 
> Does the error persists if you set DEBUG = False locally?
>
> On Tue, Mar 31, 2015 at 10:21 AM, amarshall  > wrote:
>
>> Hi Filipe,
>>
>> I have few apps installed. When I comment out the tastypie line my app 
>> builds but gets an error in production because tastypie app isn't found. 
>> Here it is:
>>
>> INSTALLED_APPS = (
>> 'django.contrib.admin',
>> 'django.contrib.auth',
>> 'django.contrib.contenttypes',
>> 'django.contrib.sessions',
>> 'django.contrib.messages',
>> 'django.contrib.staticfiles',
>> 'rest_framework',
>># 'south',   // commented out after upgrade to Django 1.7
>> 'tastypie',
>> 'lokal',#my app
>> )
>>
>>
>>
>> On Tuesday, March 31, 2015 at 5:52:55 AM UTC-4, Filipe Ximenes wrote:
>>>
>>> Can you show us your INSTALED_APPS?
>>> It may be the case you have a lot of apps installed and is not seeing a 
>>> duplicate reference to tastypie.
>>> On Mar 29, 2015 9:43 PM, "amarshall"  wrote:
>>>
 Hi,

  So I updated my django project from django 1.6 to 1.7.7 and when I run 
 "python manage.py migrate" I get this error stating that I have a 
 duplicate 
 label. 

 Here's the traceback

   Creating tables...
   Installing custom SQL...
   Installing indexes...
 Running migrations:
   Applying tastypie.0001_initial...Traceback (most recent call last):
   File "manage.py", line 11, in 
 execute_from_command_line(sys.argv)
   File "/usr/local/lib/python2.7/dist-packages/django/core/
 management/__init__.py", line 385, in execute_from_command_line
 utility.execute()
   File "/usr/local/lib/python2.7/dist-packages/django/core/
 management/__init__.py", line 377, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/usr/local/lib/python2.7/dist-packages/django/core/
 management/base.py", line 288, in run_from_argv
 self.execute(*args, **options.__dict__)
   File "/usr/local/lib/python2.7/dist-packages/django/core/
 management/base.py", line 338, in execute
 output = self.handle(*args, **options)
   File "/usr/local/lib/python2.7/dist-packages/django/core/
 management/commands/migrate.py", line 161, in handle
 executor.migrate(targets, plan, fake=options.get("fake", False))
   File "/usr/local/lib/python2.7/dist-packages/django/db/
 migrations/executor.py", line 68, in migrate
 self.apply_migration(migration, fake=fake)
   File "/usr/local/lib/python2.7/dist-packages/django/db/
 migrations/executor.py", line 96, in apply_migration
 if self.detect_soft_applied(migration):
   File "/usr/local/lib/python2.7/dist-packages/django/db/
 migrations/executor.py", line 140, in detect_soft_applied
 apps = project_state.render()
   File "/usr/local/lib/python2.7/dist-packages/django/db/
 migrations/state.py", line 57, in render
 self.apps = Apps([AppConfigStub(label) for label in 
 sorted(self.real_apps 
 + list(app_labels))])
   File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py"
 , line 56, in __init__
 self.populate(installed_apps)
   File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py"
 , line 89, in populate
 "duplicates: %s" % app_config.label)
 django.core.exceptions.ImproperlyConfigured: Application labels aren't 
 unique, duplicates: tastypie


 Not sure what to do here. I remove tastypie from the list of 
 INSTALLED_APPS in my settings and everything works fine. but I do need it. 
 Any suggestions ?

 -- 
 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...@googlegroups.com.
 To post to this group, send email to django...@googlegroups.com.
 Visit this group at http://groups.google.com/group/django-users.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/django-users/7e4cfbf8-d3e0-4e0e-a38c-b83930ffa3b6%
 40googlegroups.com 
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving 

Re: Upgrade to django 1.7- ImproperlyConfigured -Tastypie label duplicate? help

2015-03-31 Thread Filipe Ximenes
Thats strange.
Are you using pip to install dependencies? Try uninstalling everything and
reinstalling again.
Make sure INSTALLED_APPS is not being defined somewhere else in the code.
Does the error persists if you set DEBUG = False locally?

On Tue, Mar 31, 2015 at 10:21 AM, amarshall  wrote:

> Hi Filipe,
>
> I have few apps installed. When I comment out the tastypie line my app
> builds but gets an error in production because tastypie app isn't found.
> Here it is:
>
> INSTALLED_APPS = (
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> 'rest_framework',
># 'south',   // commented out after upgrade to Django 1.7
> 'tastypie',
> 'lokal',#my app
> )
>
>
>
> On Tuesday, March 31, 2015 at 5:52:55 AM UTC-4, Filipe Ximenes wrote:
>>
>> Can you show us your INSTALED_APPS?
>> It may be the case you have a lot of apps installed and is not seeing a
>> duplicate reference to tastypie.
>> On Mar 29, 2015 9:43 PM, "amarshall"  wrote:
>>
>>> Hi,
>>>
>>>  So I updated my django project from django 1.6 to 1.7.7 and when I run
>>> "python manage.py migrate" I get this error stating that I have a duplicate
>>> label.
>>>
>>> Here's the traceback
>>>
>>>   Creating tables...
>>>   Installing custom SQL...
>>>   Installing indexes...
>>> Running migrations:
>>>   Applying tastypie.0001_initial...Traceback (most recent call last):
>>>   File "manage.py", line 11, in 
>>> execute_from_command_line(sys.argv)
>>>   File "/usr/local/lib/python2.7/dist-packages/django/core/
>>> management/__init__.py", line 385, in execute_from_command_line
>>> utility.execute()
>>>   File "/usr/local/lib/python2.7/dist-packages/django/core/
>>> management/__init__.py", line 377, in execute
>>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>>   File "/usr/local/lib/python2.7/dist-packages/django/core/
>>> management/base.py", line 288, in run_from_argv
>>> self.execute(*args, **options.__dict__)
>>>   File "/usr/local/lib/python2.7/dist-packages/django/core/
>>> management/base.py", line 338, in execute
>>> output = self.handle(*args, **options)
>>>   File "/usr/local/lib/python2.7/dist-packages/django/core/
>>> management/commands/migrate.py", line 161, in handle
>>> executor.migrate(targets, plan, fake=options.get("fake", False))
>>>   File "/usr/local/lib/python2.7/dist-packages/django/db/
>>> migrations/executor.py", line 68, in migrate
>>> self.apply_migration(migration, fake=fake)
>>>   File "/usr/local/lib/python2.7/dist-packages/django/db/
>>> migrations/executor.py", line 96, in apply_migration
>>> if self.detect_soft_applied(migration):
>>>   File "/usr/local/lib/python2.7/dist-packages/django/db/
>>> migrations/executor.py", line 140, in detect_soft_applied
>>> apps = project_state.render()
>>>   File "/usr/local/lib/python2.7/dist-packages/django/db/
>>> migrations/state.py", line 57, in render
>>> self.apps = Apps([AppConfigStub(label) for label in 
>>> sorted(self.real_apps
>>> + list(app_labels))])
>>>   File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py",
>>> line 56, in __init__
>>> self.populate(installed_apps)
>>>   File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py",
>>> line 89, in populate
>>> "duplicates: %s" % app_config.label)
>>> django.core.exceptions.ImproperlyConfigured: Application labels aren't
>>> unique, duplicates: tastypie
>>>
>>>
>>> Not sure what to do here. I remove tastypie from the list of
>>> INSTALLED_APPS in my settings and everything works fine. but I do need it.
>>> Any suggestions ?
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/django-users/7e4cfbf8-d3e0-4e0e-a38c-b83930ffa3b6%
>>> 40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>  --
> 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.
> To view this discussion on the web visit
> 

Re: Upgrade to django 1.7- ImproperlyConfigured -Tastypie label duplicate? help

2015-03-31 Thread amarshall
Hi Filipe,

I have few apps installed. When I comment out the tastypie line my app 
builds but gets an error in production because tastypie app isn't found. 
Here it is:

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
   # 'south',   // commented out after upgrade to Django 1.7
'tastypie',
'lokal',#my app
)



On Tuesday, March 31, 2015 at 5:52:55 AM UTC-4, Filipe Ximenes wrote:
>
> Can you show us your INSTALED_APPS?
> It may be the case you have a lot of apps installed and is not seeing a 
> duplicate reference to tastypie.
> On Mar 29, 2015 9:43 PM, "amarshall"  
> wrote:
>
>> Hi,
>>
>>  So I updated my django project from django 1.6 to 1.7.7 and when I run 
>> "python manage.py migrate" I get this error stating that I have a duplicate 
>> label. 
>>
>> Here's the traceback
>>
>>   Creating tables...
>>   Installing custom SQL...
>>   Installing indexes...
>> Running migrations:
>>   Applying tastypie.0001_initial...Traceback (most recent call last):
>>   File "manage.py", line 11, in 
>> execute_from_command_line(sys.argv)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py"
>> , line 385, in execute_from_command_line
>> utility.execute()
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py"
>> , line 377, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
>> line 288, in run_from_argv
>> self.execute(*args, **options.__dict__)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
>> line 338, in execute
>> output = self.handle(*args, **options)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py"
>> , line 161, in handle
>> executor.migrate(targets, plan, fake=options.get("fake", False))
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py"
>> , line 68, in migrate
>> self.apply_migration(migration, fake=fake)
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py"
>> , line 96, in apply_migration
>> if self.detect_soft_applied(migration):
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py"
>> , line 140, in detect_soft_applied
>> apps = project_state.render()
>>   File 
>> "/usr/local/lib/python2.7/dist-packages/django/db/migrations/state.py", 
>> line 57, in render
>> self.apps = Apps([AppConfigStub(label) for label in 
>> sorted(self.real_apps 
>> + list(app_labels))])
>>   File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", 
>> line 56, in __init__
>> self.populate(installed_apps)
>>   File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", 
>> line 89, in populate
>> "duplicates: %s" % app_config.label)
>> django.core.exceptions.ImproperlyConfigured: Application labels aren't 
>> unique, duplicates: tastypie
>>
>>
>> Not sure what to do here. I remove tastypie from the list of 
>> INSTALLED_APPS in my settings and everything works fine. but I do need it. 
>> Any suggestions ?
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/7e4cfbf8-d3e0-4e0e-a38c-b83930ffa3b6%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5128dd5e-faa1-4c6a-9cf4-0a59f7d0bc2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Upgrade to django 1.7- ImproperlyConfigured -Tastypie label duplicate? help

2015-03-31 Thread Filipe Ximenes
Can you show us your INSTALED_APPS?
It may be the case you have a lot of apps installed and is not seeing a
duplicate reference to tastypie.
On Mar 29, 2015 9:43 PM, "amarshall"  wrote:

> Hi,
>
>  So I updated my django project from django 1.6 to 1.7.7 and when I run
> "python manage.py migrate" I get this error stating that I have a duplicate
> label.
>
> Here's the traceback
>
>   Creating tables...
>   Installing custom SQL...
>   Installing indexes...
> Running migrations:
>   Applying tastypie.0001_initial...Traceback (most recent call last):
>   File "manage.py", line 11, in 
> execute_from_command_line(sys.argv)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py"
> , line 385, in execute_from_command_line
> utility.execute()
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py"
> , line 377, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
> line 288, in run_from_argv
> self.execute(*args, **options.__dict__)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py",
> line 338, in execute
> output = self.handle(*args, **options)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py"
> , line 161, in handle
> executor.migrate(targets, plan, fake=options.get("fake", False))
>   File
> "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py",
> line 68, in migrate
> self.apply_migration(migration, fake=fake)
>   File
> "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py",
> line 96, in apply_migration
> if self.detect_soft_applied(migration):
>   File
> "/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py",
> line 140, in detect_soft_applied
> apps = project_state.render()
>   File
> "/usr/local/lib/python2.7/dist-packages/django/db/migrations/state.py",
> line 57, in render
> self.apps = Apps([AppConfigStub(label) for label in sorted(self.real_apps
> + list(app_labels))])
>   File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py",
> line 56, in __init__
> self.populate(installed_apps)
>   File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py",
> line 89, in populate
> "duplicates: %s" % app_config.label)
> django.core.exceptions.ImproperlyConfigured: Application labels aren't
> unique, duplicates: tastypie
>
>
> Not sure what to do here. I remove tastypie from the list of
> INSTALLED_APPS in my settings and everything works fine. but I do need it.
> Any suggestions ?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7e4cfbf8-d3e0-4e0e-a38c-b83930ffa3b6%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAA-QWB3KXRBBSsVOCcAJ-BDi7Av%2B_JLFHBChHik069dKvksUUg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Upgrade to django 1.7- ImproperlyConfigured -Tastypie label duplicate? help

2015-03-29 Thread amarshall
Hi,

 So I updated my django project from django 1.6 to 1.7.7 and when I run 
"python manage.py migrate" I get this error stating that I have a duplicate 
label. 

Here's the traceback

  Creating tables...
  Installing custom SQL...
  Installing indexes...
Running migrations:
  Applying tastypie.0001_initial...Traceback (most recent call last):
  File "manage.py", line 11, in 
execute_from_command_line(sys.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 385, in execute_from_command_line
utility.execute()
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 288, in run_from_argv
self.execute(*args, **options.__dict__)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", 
line 338, in execute
output = self.handle(*args, **options)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/commands/migrate.py"
, line 161, in handle
executor.migrate(targets, plan, fake=options.get("fake", False))
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", 
line 68, in migrate
self.apply_migration(migration, fake=fake)
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", 
line 96, in apply_migration
if self.detect_soft_applied(migration):
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/migrations/executor.py", 
line 140, in detect_soft_applied
apps = project_state.render()
  File 
"/usr/local/lib/python2.7/dist-packages/django/db/migrations/state.py", 
line 57, in render
self.apps = Apps([AppConfigStub(label) for label in sorted(self.real_apps 
+ list(app_labels))])
  File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", 
line 56, in __init__
self.populate(installed_apps)
  File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", 
line 89, in populate
"duplicates: %s" % app_config.label)
django.core.exceptions.ImproperlyConfigured: Application labels aren't 
unique, duplicates: tastypie


Not sure what to do here. I remove tastypie from the list of INSTALLED_APPS 
in my settings and everything works fine. but I do need it. Any suggestions 
?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7e4cfbf8-d3e0-4e0e-a38c-b83930ffa3b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django and pydoc - ImproperlyConfigured

2015-02-24 Thread Gergely Polonkai
Hello,

I'm trying to document my own webpage's code so I will remember each piece
if I have to touch it later. I added docstrings to several functions
already, and while this is generally enough, I couldn't help but tried
pydoc blog.models.Post

What I got instead of the craved documents was an ImuroperlyConfigured
exception. I found some clues that defining a settings module via the
DJANGO_SETTINGS_MODULE  environment variable would help (and it does), but
it just doesn't sound right to me. Isn't there an easier solution? (Note
that I don't count putting this env variable to the virtualenv's activate
scripts as an easier method :)

Best,
Gergely

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACczBUJiQG6O1OOWGs26nMYXjexH_H8QjbdpuapnTEHkTmN%2B6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error: ImproperlyConfigured: The SECRET_KEY setting must not be empty

2014-06-24 Thread Lachlan Musicman
I find I get this error when I forget to set my settings, since I have
a split settings set up:

python manage.py --settings=app.settings.dev

got to remember the --settings=app.settings.x

On 24 June 2014 22:14, Tom Evans <tevans...@googlemail.com> wrote:
> On Tue, Jun 24, 2014 at 9:59 AM, Rini Michael <rinzyra...@gmail.com> wrote:
>> Hi,
>> i was trying to install django_cron using pip install django_cron,but
>> unfortunately
>> now i find a error as
>> ImproperlyConfigured: The SECRET_KEY setting must not be empty
>> can anybody help me with this
>> Thanks in advance
>>
>> regards,
>> Rini
>
> Set a secret key:
>
> https://docs.djangoproject.com/en/1.6/ref/settings/#secret-key
>
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAFHbX1LSLmHDimUTGTY1-zV6Rv9aaeyW%3Dgz63aShv8%2BO%3DfbgFA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
The idea is that a beautiful image is frameable. Everything you need
to see is there: It’s everything you want, and it’s very pleasing
because there’s no extra information that you don’t get to see.
Everything’s in a nice package for you. But sublime art is
unframeable: It’s an image or idea that implies that there’s a bigger
image or idea that you can’t see: You’re only getting to look at a
fraction of it, and in that way it’s both beautiful and scary, because
it’s reminding you that there’s more that you don’t have access to.
It’s now sort of left the piece itself and it’s become your own
invention, so it’s personal as well as being scary as well as being
beautiful, which is what I really like about art like that.
---
Adventure Time http://theholenearthecenteroftheworld.com/

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGBeqiP3SC0bMPdsV_msoU9yUZ%3Dqi0d4FJjCC5cYbXBqA95BkQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Error: ImproperlyConfigured: The SECRET_KEY setting must not be empty

2014-06-24 Thread Tom Evans
On Tue, Jun 24, 2014 at 9:59 AM, Rini Michael <rinzyra...@gmail.com> wrote:
> Hi,
> i was trying to install django_cron using pip install django_cron,but
> unfortunately
> now i find a error as
> ImproperlyConfigured: The SECRET_KEY setting must not be empty
> can anybody help me with this
> Thanks in advance
>
> regards,
> Rini

Set a secret key:

https://docs.djangoproject.com/en/1.6/ref/settings/#secret-key

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1LSLmHDimUTGTY1-zV6Rv9aaeyW%3Dgz63aShv8%2BO%3DfbgFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Error: ImproperlyConfigured: The SECRET_KEY setting must not be empty

2014-06-24 Thread Rini Michael
Hi,
i was trying to install django_cron using pip install django_cron,but
unfortunately
now i find a error as
ImproperlyConfigured: The SECRET_KEY setting must not be empty
can anybody help me with this
Thanks in advance

regards,
Rini

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFoY06uqrKrGWDzD3DYasB59FpyUqdp2zHjXTH-wjkJd8hz%2Bjg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django throws ImproperlyConfigured error when loading URLconf on startup

2014-04-03 Thread Lachlan Musicman
Are you using Debug toolbar?

Try this: 
http://stackoverflow.com/questions/20963856/improperlyconfigured-the-included-urlconf-project-urls-doesnt-have-any-patte

cheers
L.

On 4 April 2014 11:14, Max Demars <burton449...@gmail.com> wrote:
> Greetings,
>
> I encounter the same error here. In latest gunicorn release, it's not
> possible anymore to deploy gunicorn/django the old way doing python
> manage.py run_gunicorn, so I'm stuck...I'd like to know if someone found
> what causes this error.
>
> -Max Demars
>
> On Wednesday, November 28, 2012 6:03:10 PM UTC-5, Michael Dippery wrote:
>>
>> I have a Django app running on a production server. It is handled with
>> gunicorn 0.14.2 behind nginx. When I reload the app (by reloading the
>> gunicorn workers), I get this error:
>>
>> ---
>> Traceback (most recent call last):
>>
>>  File
>> "/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/handlers/base.py",
>> line 101, in get_response
>>request.path_info)
>>
>>  File
>> "/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/urlresolvers.py",
>> line 250, in resolve
>>for pattern in self.url_patterns:
>>
>>  File
>> "/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/urlresolvers.py",
>> line 283, in _get_url_patterns
>>raise ImproperlyConfigured("The included urlconf %s doesn't have any
>> patterns in it" % self.urlconf_name)
>>
>> ImproperlyConfigured: The included urlconf myapp.urls doesn't have any
>> patterns in it
>> ---
>>
>> Others with this problem have commonly noted that it occurs while using
>> reverse in a URLconf, but I am not using reverse in any URLconfs (nor are
>> they used in any third-party apps). Also, this error only occurs in
>> production -- never in development (using the Django dev server) or on my
>> staging server (also using gunicorn 0.14.2 behind nginx). It also doesn't
>> seem to cause trouble with the site at any other time then during reloads.
>> And it only happens for the first 10-20 requests on the website (which makes
>> me wonder if it's some sort of race condition, perhaps).
>>
>> Any ideas what's causing the problem?
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b9653b7b-c3bc-408a-9b38-e8cd10e6e4d7%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
>From this perspective it is natural that anarchism be marked by
spontaneity, differentiation, and experimentation that it be marked by
an expressed affinity with chaos, if chaos is understood to be what
lies outside or beyond the dominant game or system. Because of the
resistance to definition and categorisation, the anarchist principle
has been variously interpreted as, rather than an articulated
position, “a moral attitude, an emotional climate, or even a mood”.
This mood hangs in dramatic tension between utopian hope or dystopian
nihilism...
-
http://zuihitsu.org/godspeed-you-black-emperor-and-the-politics-of-chaos

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGBeqiPpOEFjUDPEREYgwxCvciUqgejJy7%2BzObf1STQjNUyPnA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django throws ImproperlyConfigured error when loading URLconf on startup

2014-04-03 Thread Max Demars
Greetings,

I encounter the same error here. In latest gunicorn release, it's not 
possible anymore to deploy gunicorn/django the old way doing python 
manage.py run_gunicorn, so I'm stuck...I'd like to know if someone found 
what causes this error.

-Max Demars

On Wednesday, November 28, 2012 6:03:10 PM UTC-5, Michael Dippery wrote:
>
> I have a Django app running on a production server. It is handled with 
> gunicorn 0.14.2 behind nginx. When I reload the app (by reloading the 
> gunicorn workers), I get this error: 
>
> --- 
> Traceback (most recent call last): 
>
>  File 
> "/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/handlers/base.py",
>  
> line 101, in get_response 
>request.path_info) 
>
>  File 
> "/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/urlresolvers.py",
>  
> line 250, in resolve 
>for pattern in self.url_patterns: 
>
>  File 
> "/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/urlresolvers.py",
>  
> line 283, in _get_url_patterns 
>raise ImproperlyConfigured("The included urlconf %s doesn't have any 
> patterns in it" % self.urlconf_name) 
>
> ImproperlyConfigured: The included urlconf myapp.urls doesn't have any 
> patterns in it 
> --- 
>
> Others with this problem have commonly noted that it occurs while using 
> reverse in a URLconf, but I am not using reverse in any URLconfs (nor are 
> they used in any third-party apps). Also, this error only occurs in 
> production -- never in development (using the Django dev server) or on my 
> staging server (also using gunicorn 0.14.2 behind nginx). It also doesn't 
> seem to cause trouble with the site at any other time then during reloads. 
> And it only happens for the first 10-20 requests on the website (which 
> makes me wonder if it's some sort of race condition, perhaps). 
>
> Any ideas what's causing the problem?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b9653b7b-c3bc-408a-9b38-e8cd10e6e4d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ImproperlyConfigured: Error loading psycopg2 module: No module named _psycopg

2014-01-17 Thread Начаров Михаил

You're welcome!

You can also take a look to another python web-server.
Especially if you want to have for example two sites with different 
version of python on the same server.

When I wrote my first django-app on py3, I faced the same problem.


17.01.2014 15:34, Timothy W. Cook пишет:




On Fri, Jan 17, 2014 at 1:52 AM, Начаров Михаил 
> wrote:


Hi Timothy,

Note that your mod_wsgi module compiled for using python2.7. So
what you need now is install(compile) mod_wsgi for python3
instead of the same module compiled for python2.7.
On Debian you can do it by this command:
$ sudo apt-get install libapache2-mod-wsgi-py3


Thanks,  After some poking around, I did find that this was the 
problem.  Now, recompiling it on CentOS (with Python 3 as an alternate 
install) was quite another trick.  :-)


Thanks.



--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/52D9027B.4060304%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ImproperlyConfigured: Error loading psycopg2 module: No module named _psycopg

2014-01-17 Thread Timothy W. Cook
On Fri, Jan 17, 2014 at 1:52 AM, Начаров Михаил
wrote:

>  Hi Timothy,
>
> Note that your mod_wsgi module compiled for using python2.7. So what you
> need now is install(compile) mod_wsgi for python3 instead of the
> same module compiled for python2.7.
> On Debian you can do it by this command:
> $ sudo apt-get install libapache2-mod-wsgi-py3
>
>
> Thanks,  After some poking around, I did find that this was the problem.
 Now, recompiling it on CentOS (with Python 3 as an alternate install) was
quite another trick.  :-)

Thanks.


>
> 16.01.2014 16:34, Timothy W. Cook пишет:
>
> This question is also on Stackoverflow http://goo.gl/LinMue  but I
> thought somene here may have an idea.
>
>
>   I have a Django 1.5, Python 2.7 site running under Apache with mod_wsgi
> on a CentOS 6.4 server.
>
> I have rebuilt this site using Django 1.6 and Python 3.3. Deploying it to
> the same server and changing the paths in httpd.conf I get the subject
> error. This new install works as expected using ./manage.py runserver.
>
> Here are the two WSGI definitions from httpd.conf:
>
> WSGIScriptAlias / /home/ccdgen/CCDGEN2/apache/wsgi.py
> WSGIPythonPath 
> /home/ccdgen/CCDGEN2/ccdgen/ccdgen:/home/ccdgen/CCDGEN2/ccdgen:/home/ccdgen/CCDGEN2/lib/python3.3/site-packages  /home/ccdgen/CCDGEN2/ccdgen>
>
>  Order allow,deny
>  Allow from all
>
> #WSGIScriptAlias /ccdgen /home/ccdgen/CCDGEN/apache/wsgi.py#WSGIPythonPath 
> /home/ccdgen/CCDGEN/mlhim/ccdgen:/home/ccdgen/CCDGEN/mlhim:/home/ccdgen/CCDGEN/lib/python2.7/site-pa
> ckages##   # Order 
> allow,deny# Allow from all#   #
>
>  The wsgi.py file is the same on both installations:
>
> import os
> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mlhim.settings")from 
> django.core.wsgi import get_wsgi_application
> application = get_wsgi_application()
>
>
>
> --
>
>  Thanks in advance for any ideas.
>
>  Cheers,
>  Tim
>
>
>  --
> MLHIM VIP Signup: http://goo.gl/22B0U
> 
> Timothy Cook, MSc   +55 21 94711995
> MLHIM http://www.mlhim.org
> Like Us on FB: https://www.facebook.com/mlhim2
> Circle us on G+: http://goo.gl/44EV5
> Google Scholar: http://goo.gl/MMZ1o
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
>   --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3XNi7-FGOCPnKS%2Bb6%3D-ueWbPMOWFXfOce663fn0YpjWwQ%40mail.gmail.com
> .
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/52D8A90F.3040209%40gmail.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
MLHIM VIP Signup: http://goo.gl/22B0U

Timothy Cook, MSc   +55 21 94711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3UYB-V37doGX%2B8GSY%3DN_ZOSAkPKbUHhwLvm0kBbxYd4%2Bw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ImproperlyConfigured: Error loading psycopg2 module: No module named _psycopg

2014-01-16 Thread Начаров Михаил

Hi Timothy,

Note that your mod_wsgi module compiled for using python2.7. So what you 
need now is install(compile) mod_wsgi for python3 instead of the 
same module compiled for python2.7.

On Debian you can do it by this command:
$ sudo apt-get install libapache2-mod-wsgi-py3



16.01.2014 16:34, Timothy W. Cook пишет:
This question is also on Stackoverflow http://goo.gl/LinMue  but I 
thought somene here may have an idea.



I have a Django 1.5, Python 2.7 site running under Apache with 
mod_wsgi on a CentOS 6.4 server.


I have rebuilt this site using Django 1.6 and Python 3.3. Deploying it 
to the same server and changing the paths in httpd.conf I get the 
subject error. This new install works as expected using ./manage.py 
runserver.


Here are the two WSGI definitions from httpd.conf:

|WSGIScriptAlias/  /home/ccdgen/CCDGEN2/apache/wsgi.py
WSGIPythonPath/home/ccdgen/CCDGEN2/ccdgen/ccdgen:/home/ccdgen/CCDGEN2/ccdgen:/home/ccdgen/CCDGEN2/lib/python3.3/site-packages


  Order  allow,deny
  Allowfrom  all



#WSGIScriptAlias/ccdgen/home/ccdgen/CCDGEN/apache/wsgi.py
#WSGIPythonPath/home/ccdgen/CCDGEN/mlhim/ccdgen:/home/ccdgen/CCDGEN/mlhim:/home/ccdgen/CCDGEN/lib/python2.7/site-packages
#
#
#  Order  allow,deny
#  Allowfrom  all
#
#|

The wsgi.py file is the same on both installations:

|import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE",  "mlhim.settings")
from  django.core.wsgi import get_wsgi_application
application=  get_wsgi_application()|

--

Thanks in advance for any ideas.

Cheers,
Tim


--
MLHIM VIP Signup: http://goo.gl/22B0U

Timothy Cook, MSc   +55 21 94711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3XNi7-FGOCPnKS%2Bb6%3D-ueWbPMOWFXfOce663fn0YpjWwQ%40mail.gmail.com.

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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/52D8A90F.3040209%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


ImproperlyConfigured: Error loading psycopg2 module: No module named _psycopg

2014-01-16 Thread Timothy W. Cook
This question is also on Stackoverflow http://goo.gl/LinMue  but I thought
somene here may have an idea.


I have a Django 1.5, Python 2.7 site running under Apache with mod_wsgi on
a CentOS 6.4 server.

I have rebuilt this site using Django 1.6 and Python 3.3. Deploying it to
the same server and changing the paths in httpd.conf I get the subject
error. This new install works as expected using ./manage.py runserver.

Here are the two WSGI definitions from httpd.conf:

WSGIScriptAlias / /home/ccdgen/CCDGEN2/apache/wsgi.py
WSGIPythonPath
/home/ccdgen/CCDGEN2/ccdgen/ccdgen:/home/ccdgen/CCDGEN2/ccdgen:/home/ccdgen/CCDGEN2/lib/python3.3/site-packages
   
 Order allow,deny
 Allow from all
   
#WSGIScriptAlias /ccdgen
/home/ccdgen/CCDGEN/apache/wsgi.py#WSGIPythonPath
/home/ccdgen/CCDGEN/mlhim/ccdgen:/home/ccdgen/CCDGEN/mlhim:/home/ccdgen/CCDGEN/lib/python2.7/site-packages##   # Order allow,deny#
  Allow from all#   #

The wsgi.py file is the same on both installations:

import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mlhim.settings")from
django.core.wsgi import get_wsgi_application
application = get_wsgi_application()


--

Thanks in advance for any ideas.

Cheers,
Tim


-- 
MLHIM VIP Signup: http://goo.gl/22B0U

Timothy Cook, MSc   +55 21 94711995
MLHIM http://www.mlhim.org
Like Us on FB: https://www.facebook.com/mlhim2
Circle us on G+: http://goo.gl/44EV5
Google Scholar: http://goo.gl/MMZ1o
LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B%3DOU3XNi7-FGOCPnKS%2Bb6%3D-ueWbPMOWFXfOce663fn0YpjWwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django throws ImproperlyConfigured error when loading URLconf on startup

2014-01-02 Thread Ahmed Khan
Any progress on this? Does anyone know the causes?

On Sunday, June 23, 2013 2:55:16 PM UTC+5, Pratik Mandrekar wrote:
>
> Has anyone been able to resolve this?
>
> I am facing the same issue.
>
> On Sunday, March 24, 2013 8:46:26 PM UTC+5:30, Dan Gentry wrote:
>>
>> Andrei, I once received this error when the problem was actually in 
>> another python module being imported - in my case views.py.  Hope this 
>> helps, Dan
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6df3be6b-e0a6-41d0-b41a-40bae2e52d8c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


ImproperlyConfigured DJANGO_SETTINGS_MODULE error when migrating from 1.5.1 to 1.6

2013-11-08 Thread Brian DeWeese
I'm using Apache 2.4 and Python 2.6.8.  We have several different virtual 
hosts and the DJANGO_SETTINGS_MODULE is defined within each virtual host. 
 However, the wsgi file gets loaded before the settings.py file.  This 
works fine under Django 1.5.1 as settings aren't referenced from within the 
wsgi.  But with 1.6 it does get referenced and therefore raises an 
ImproperlyConfigured error.  Does anyone have any suggestions to help fix 
this issue?  Is there anyway I can get the settings module to load before 
the wsgi module?

Brian DeWeese


-- apache.conf --

WSGIScriptAlias / /opt/ecn/www/web-sites/wsgi/foo.wsgi

Allow from all


WSGIDaemonProcess mysite1 display-name=%{GROUP} processes=10


ServerName mysite1.foo
SetEnv DJANGO_SETTINGS_MODULE mysite1.settings
WSGIProcessGroup mysite1



-- output --
[Fri Nov 08 13:24:02.120637 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192] mod_wsgi (pid=20169): Target WSGI script 
'/opt/ecn/www/web-sites/wsgi/foo.wsgi' cannot be loaded as Python module.
[Fri Nov 08 13:24:02.120703 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192] mod_wsgi (pid=20169): Exception occurred processing WSGI 
script '/opt/ecn/www/web-sites/wsgi/foo.wsgi'.
[Fri Nov 08 13:24:02.120735 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192] Traceback (most recent call last):
[Fri Nov 08 13:24:02.120767 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192]   File "/opt/ecn/www/web-sites/wsgi/foo.wsgi", line 8, in 

[Fri Nov 08 13:24:02.120879 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192] from django.core.handlers import wsgi as django_wsgi
[Fri Nov 08 13:24:02.120901 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192]   File "/opt/ecn/www/Django/django/core/handlers/wsgi.py", 
line 11, in 
[Fri Nov 08 13:24:02.121020 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192] from django.core.handlers import base
[Fri Nov 08 13:24:02.121048 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192]   File "/opt/ecn/www/Django/django/core/handlers/base.py", 
line 12, in 
[Fri Nov 08 13:24:02.121186 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192] from django.db import connections, transaction
[Fri Nov 08 13:24:02.121215 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192]   File "/opt/ecn/www/Django/django/db/__init__.py", line 
83, in 
[Fri Nov 08 13:24:02.121314 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192] signals.request_started.connect(reset_queries)
[Fri Nov 08 13:24:02.121343 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192]   File 
"/opt/ecn/www/Django/django/dispatch/dispatcher.py", line 88, in connect
[Fri Nov 08 13:24:02.121489 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192] if settings.DEBUG:
[Fri Nov 08 13:24:02.121520 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192]   File "/opt/ecn/www/Django/django/conf/__init__.py", line 
54, in __getattr__
[Fri Nov 08 13:24:02.121628 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192] self._setup(name)
[Fri Nov 08 13:24:02.121656 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192]   File "/opt/ecn/www/Django/django/conf/__init__.py", line 
47, in _setup
[Fri Nov 08 13:24:02.121690 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192] % (desc, ENVIRONMENT_VARIABLE))
[Fri Nov 08 13:24:02.121729 2013] [:error] [pid 20169] [remote 
127.0.0.1:40192] ImproperlyConfigured: Requested setting DEBUG, but 
settings are not configured. You must either define the environment 
variable DJANGO_SETTINGS_MODULE or call settings.configure() before 
accessing settings.


-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c9f822e5-2993-4fce-9f9f-bbd0bef43dd2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before access

2013-11-02 Thread hjwp
Weirdly I'm getting this error when I 'am' running manage.py.  I'm doing 
something slightly weird, in that I'm using Popen from inside another 
python process to run python manage.py.  Still, it worked a few weeks back 
and just started happening.  Any tips on where to look to debug it?

On Thursday, April 25, 2013 3:22:16 PM UTC+1, Tom Evans wrote:
>
> On Thu, Apr 25, 2013 at 2:56 PM, Iftikhar Ali 
>  
> wrote: 
> > when i am running the project it is running perfectly fine but when i am 
> > trying to open django-admin.py shell the error: 
>
> Don;t use django-admin to launch the shell, only use django-admin to 
> create projects¹. Once you have created your project using 
> django-admin.py, use the manage.py script it created inside your 
> project to interact in any with it - creating apps, running syncdb, 
> accessing the project shell. 
>
> See the docs here: 
>
>
> https://docs.djangoproject.com/en/1.5/ref/django-admin/#django-admin-py-and-manage-py
>  
>
> The reason you want to use manage.py over django-admin,py is that 
> manage.py can usually find your settings automatically - it 
> automatically sets the environment variable DJANGO_SETTINGS_MODULE to 
> the correct value. 
>
> Cheers 
>
> Tom 
>
> ¹ Or standalone apps. For apps within the project, you use manage.py 
> startapp, like everything else in the project. 
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2320a9da-8264-49d2-af2f-0b6abba39bfd%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ImproperlyConfigured at /admin/polls/poll/add/ 'model' is a required attribute of 'PollAdmin.inlines[0]'.

2013-10-23 Thread Adrian Paul Ciobanita
Thx Magnum. That made the difference.

On Wednesday, October 23, 2013 4:22:15 PM UTC+3, Lucas Magnum wrote:
>
> Rename the attribute "mode" to *model* in the ChoiceInline.
>
> []'s
>
> Lucas Magnum.
>
>
> 2013/10/23 Adrian Paul Ciobanita <adrian.c...@gmail.com >
>
>> Hello, i've been playing with Django 1.5.4 for some TDD tutorials, 
>> examples, and tried to also do the tutorial : 
>> https://docs.djangoproject.com/en/1.4/intro/tutorial02/#adding-related-objects
>> BUT i keep receiving this error, as suggested in the Subject: 
>>
>>> ImproperlyConfigured at /admin/polls/poll/add/ 
>>
>> 'model' is a required attribute of 'PollAdmin.inlines[0]'.
>>>
>>
>> This is my admin.py content:
>> from django.contrib import admin 
>> 
>>
>> from polls.models import Choice, Poll
>>
>>
>> class ChoiceInline(admin.StackedInline):
>> mode = Choice
>> extra = 2
>> 
>> class PollAdmin(admin.ModelAdmin):
>> fieldsets = [
>> (None, {'fields': ['question']}),
>> ('Date information', {'fields': ['pub_date'], 'classes': 
>> ['collapse']}),]
>> inlines = [ChoiceInline]
>> list_display = ('question', 'pub_date', 'was_published_recently')
>> search_fields = ['question']
>> list_filter = ['pub_date']
>>   
>> admin.site.register(Poll, PollAdmin)
>>
>> If i change admin.py and i'm left with:
>> admin.site.register(Poll)
>>
>> Then i have no problem whatsoever with accessing, creating, deleting 
>> polls.
>>
>> Can any of you please point out in the right direction? It get's really 
>> frustrating. :(
>>
>> Below is the output/stacktrace from the server:
>> Internal Server Error: /admin/polls/poll/add/
>> Traceback (most recent call last):
>>   File 
>> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/handlers/base.py",
>>  
>> line 103, in get_response
>> resolver_match = resolver.resolve(request.path_info)
>>   File 
>> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py",
>>  
>> line 319, in resolve
>> for pattern in self.url_patterns:
>>   File 
>> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py",
>>  
>> line 347, in url_patterns
>> patterns = getattr(self.urlconf_module, "urlpatterns", 
>> self.urlconf_module)
>>   File 
>> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py",
>>  
>> line 342, in urlconf_module
>> self._urlconf_module = import_module(self.urlconf_name)
>>   File 
>> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/utils/importlib.py",
>>  
>> line 35, in import_module
>> __import__(name)
>>   File "/home/teach3r/work_dir/tutorials/mysite/mysite/urls.py", line 5, 
>> in 
>> admin.autodiscover()
>>   File 
>> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/__init__.py",
>>  
>> line 29, in autodiscover
>> import_module('%s.admin' % app)
>>   File 
>> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/utils/importlib.py",
>>  
>> line 35, in import_module
>> __import__(name)
>>   File "/home/teach3r/work_dir/tutorials/mysite/polls/admin.py", line 19, 
>> in 
>> admin.site.register(Poll, PollAdmin)
>>   File 
>> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/sites.py",
>>  
>> line 98, in register
>> validate(admin_class, model)
>>   File 
>> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/validation.py",
>>  
>> line 184, in validate
>> "of '%s.inlines[%d]'." % (cls.__name__, idx))
>> ImproperlyConfigured: 'model' is a required attribute of 
>> 'PollAdmin.inlines[0]'.
>>
>> Thx in advance.
>>
>> Kind regards.
>>  
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> T

Re: ImproperlyConfigured at /admin/polls/poll/add/ 'model' is a required attribute of 'PollAdmin.inlines[0]'.

2013-10-23 Thread Lucas Magnum
Rename the attribute "mode" to *model* in the ChoiceInline.

[]'s

Lucas Magnum.


2013/10/23 Adrian Paul Ciobanita <adrian.cioban...@gmail.com>

> Hello, i've been playing with Django 1.5.4 for some TDD tutorials,
> examples, and tried to also do the tutorial :
> https://docs.djangoproject.com/en/1.4/intro/tutorial02/#adding-related-objects
> BUT i keep receiving this error, as suggested in the Subject:
>
>> ImproperlyConfigured at /admin/polls/poll/add/
>
> 'model' is a required attribute of 'PollAdmin.inlines[0]'.
>>
>
> This is my admin.py content:
> from django.contrib import admin
>
>
> from polls.models import Choice, Poll
>
>
> class ChoiceInline(admin.StackedInline):
> mode = Choice
> extra = 2
>
> class PollAdmin(admin.ModelAdmin):
> fieldsets = [
> (None, {'fields': ['question']}),
> ('Date information', {'fields': ['pub_date'], 'classes':
> ['collapse']}),]
> inlines = [ChoiceInline]
> list_display = ('question', 'pub_date', 'was_published_recently')
> search_fields = ['question']
> list_filter = ['pub_date']
>
> admin.site.register(Poll, PollAdmin)
>
> If i change admin.py and i'm left with:
> admin.site.register(Poll)
>
> Then i have no problem whatsoever with accessing, creating, deleting polls.
>
> Can any of you please point out in the right direction? It get's really
> frustrating. :(
>
> Below is the output/stacktrace from the server:
> Internal Server Error: /admin/polls/poll/add/
> Traceback (most recent call last):
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/handlers/base.py",
> line 103, in get_response
> resolver_match = resolver.resolve(request.path_info)
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py",
> line 319, in resolve
> for pattern in self.url_patterns:
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py",
> line 347, in url_patterns
> patterns = getattr(self.urlconf_module, "urlpatterns",
> self.urlconf_module)
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py",
> line 342, in urlconf_module
> self._urlconf_module = import_module(self.urlconf_name)
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/utils/importlib.py",
> line 35, in import_module
> __import__(name)
>   File "/home/teach3r/work_dir/tutorials/mysite/mysite/urls.py", line 5,
> in 
> admin.autodiscover()
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/__init__.py",
> line 29, in autodiscover
> import_module('%s.admin' % app)
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/utils/importlib.py",
> line 35, in import_module
> __import__(name)
>   File "/home/teach3r/work_dir/tutorials/mysite/polls/admin.py", line 19,
> in 
> admin.site.register(Poll, PollAdmin)
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/sites.py",
> line 98, in register
> validate(admin_class, model)
>   File
> "/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/validation.py",
> line 184, in validate
> "of '%s.inlines[%d]'." % (cls.__name__, idx))
> ImproperlyConfigured: 'model' is a required attribute of
> 'PollAdmin.inlines[0]'.
>
> Thx in advance.
>
> Kind regards.
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5d666f2e-6c3b-4997-b88b-8f47968ac410%40googlegroups.com
> .
> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAAB7jOzzgjLnOU0_iM%2BaZo%3D2_QyZexbgwcG5Xp8Tn6ntPOvorQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


ImproperlyConfigured at /admin/polls/poll/add/ 'model' is a required attribute of 'PollAdmin.inlines[0]'.

2013-10-23 Thread Adrian Paul Ciobanita
Hello, i've been playing with Django 1.5.4 for some TDD tutorials, 
examples, and tried to also do the tutorial : 
https://docs.djangoproject.com/en/1.4/intro/tutorial02/#adding-related-objects
BUT i keep receiving this error, as suggested in the Subject: 

> ImproperlyConfigured at /admin/polls/poll/add/ 

'model' is a required attribute of 'PollAdmin.inlines[0]'.
>

This is my admin.py content:
from django.contrib import admin   

 
from polls.models import Choice, Poll
   
   
class ChoiceInline(admin.StackedInline):
mode = Choice
extra = 2

class PollAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['question']}),
('Date information', {'fields': ['pub_date'], 'classes': 
['collapse']}),]
inlines = [ChoiceInline]
list_display = ('question', 'pub_date', 'was_published_recently')
search_fields = ['question']
list_filter = ['pub_date']
  
admin.site.register(Poll, PollAdmin)

If i change admin.py and i'm left with:
admin.site.register(Poll)

Then i have no problem whatsoever with accessing, creating, deleting polls.

Can any of you please point out in the right direction? It get's really 
frustrating. :(

Below is the output/stacktrace from the server:
Internal Server Error: /admin/polls/poll/add/
Traceback (most recent call last):
  File 
"/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/handlers/base.py",
 
line 103, in get_response
resolver_match = resolver.resolve(request.path_info)
  File 
"/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py",
 
line 319, in resolve
for pattern in self.url_patterns:
  File 
"/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py",
 
line 347, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", 
self.urlconf_module)
  File 
"/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/core/urlresolvers.py",
 
line 342, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
  File 
"/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/utils/importlib.py",
 
line 35, in import_module
__import__(name)
  File "/home/teach3r/work_dir/tutorials/mysite/mysite/urls.py", line 5, in 

admin.autodiscover()
  File 
"/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/__init__.py",
 
line 29, in autodiscover
import_module('%s.admin' % app)
  File 
"/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/utils/importlib.py",
 
line 35, in import_module
__import__(name)
  File "/home/teach3r/work_dir/tutorials/mysite/polls/admin.py", line 19, 
in 
admin.site.register(Poll, PollAdmin)
  File 
"/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/sites.py",
 
line 98, in register
validate(admin_class, model)
  File 
"/home/teach3r/work_dir/tutorials/tdddjango/local/lib/python2.7/site-packages/django/contrib/admin/validation.py",
 
line 184, in validate
"of '%s.inlines[%d]'." % (cls.__name__, idx))
ImproperlyConfigured: 'model' is a required attribute of 
'PollAdmin.inlines[0]'.

Thx in advance.

Kind regards.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5d666f2e-6c3b-4997-b88b-8f47968ac410%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Daniel Roseman
On Thursday, 19 September 2013 08:21:49 UTC+1, Leo wrote:

> A question to better understand your problem: do you use a custom User 
> model in Django 1.3?
> Did you perhaps set the AUTH_USER_MODEL=auth.User in your settings.py?
>

There was no such thing as that setting in 1.3. It's new in 1.5.
--
DR. 

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Leonardo Giordani
The way you are creating the DB is quite complicated, but I suspect that
you are not syncing the base Django applications before doing your magic
stuff. That could be the reason why Django is complaining about the
auth.User not being installed.

I would do the following:

* settings.py with the core apps
* syncdb
* inspectdb
* schemamigration --auto
* migrate

I strongly feel that your problem has to do with Django processing your
models BEFORE doing the base stuff.
Can you try this?

Regards

Leo


Leonardo Giordani
Author of The Digital Cat 
My profile on About.me  - My GitHub
page- My Coderwall
profile 


2013/9/19 Lauri Carpenter 

> More information:
>
> Interactively, I can get a user_model:
>
> $ python
> Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48)
> [GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from django.contrib.auth import get_user_model
> >>> user_model = get_user_model()
> >>> user_model
> 
> >>>
> >>>
> >>> from django.conf import settings
> >>> settings.AUTH_USER_MODEL
> 'auth.User'
> >>>
>
> (note that the settings.AUTH_USER_MODEL is being calculated by django, not
> set by us; our settings.py file does not include any reference to
> AUTH_USER_anything).
>
> But when this happens during the authentication portion of the web
> interface, it causes the traceback, from somewhere within the
> django.contrib.auth forms for logging in (see traceback in initial
> posting).
>
> -- lauri
>
> On Wednesday, September 18, 2013 12:51:30 PM UTC-5, Lauri Carpenter wrote:
>>
>> We have been using django 1.3.0 for a long time.  We are now trying to
>> migrate to 1.5.4.  We have not changed any schema or model information.  We
>> have been using two layers of middleware and backends (notably something
>> based on SSLAuth Django App to authenticate first by certificate issued
>> from a trusted authority, then django_auth_ldap to login via ldap if no
>> valid certificate is presented). Both of these live on top of whatever
>> user/certificate/client/etc. scheme is supported in django 1.3.0.
>> [snip]
>>
>>  --
> 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.
> 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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Lauri Carpenter
Ok, I have found the problem (through digging through to post more 
information about it).

It turns out that in our gui application, the gui-specific settings file 
was setting:
INSTALLED_APPS = (
'ncis_gui',
'ncis_sslauth',
'django_auth_ldap',
)

and did not include the apps that come by default with django.  When I fix 
this to contain the full list,
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'ncis_gui',
'ncis_sslauth',
'django_auth_ldap',
)

things started to work again.

Thank you for helping me to walk through all of this.  Now I wonder why 
this is working at all in django 1.3.0, but at least I know how to move 
forward to make it work in django 1.5.4!

Thanks much, lauri

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Lauri Carpenter
More information: 

Interactively, I can get a user_model:

$ python
Python 2.6.6 (r266:84292, Oct 12 2012, 14:23:48) 
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.contrib.auth import get_user_model
>>> user_model = get_user_model()
>>> user_model

>>> 
>>> 
>>> from django.conf import settings
>>> settings.AUTH_USER_MODEL
'auth.User'
>>>

(note that the settings.AUTH_USER_MODEL is being calculated by django, not 
set by us; our settings.py file does not include any reference to 
AUTH_USER_anything).

But when this happens during the authentication portion of the web 
interface, it causes the traceback, from somewhere within the 
django.contrib.auth forms for logging in (see traceback in initial 
posting).   

-- lauri

On Wednesday, September 18, 2013 12:51:30 PM UTC-5, Lauri Carpenter wrote:
>
> We have been using django 1.3.0 for a long time.  We are now trying to 
> migrate to 1.5.4.  We have not changed any schema or model information.  We 
> have been using two layers of middleware and backends (notably something 
> based on SSLAuth Django App to authenticate first by certificate issued 
> from a trusted authority, then django_auth_ldap to login via ldap if no 
> valid certificate is presented). Both of these live on top of whatever 
> user/certificate/client/etc. scheme is supported in django 1.3.0.
> [snip]
>
>

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Lauri Carpenter
Yes, it is installed:

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
)

-- lauri

On Wednesday, September 18, 2013 1:41:48 PM UTC-5, Daniel Roseman wrote:
>
> On Wednesday, 18 September 2013 18:51:30 UTC+1, Lauri Carpenter wrote:
>
>> We have been using django 1.3.0 for a long time.  We are now trying to 
>> migrate to 1.5.4.  We have not changed any schema or model information.  We 
>> have been using two layers of middleware and backends (notably something 
>> based on SSLAuth Django App to authenticate first by certificate issued 
>> from a trusted authority, then django_auth_ldap to login via ldap if no 
>> valid certificate is presented). Both of these live on top of whatever 
>> user/certificate/client/etc. scheme is supported in django 1.3.0.
>>
>> But under django 1.5.4 we are 
>> seeing django.core.exceptions.ImproperlyConfigured exceptions 
>> "AUTH_USER_MODEL refers to model 'auth.User' that has not been installed" 
>> on the gui page when trying to log in.  The chunk'o'code that handles 
>> looking for certificate and creating a user if the certificate is presented 
>> gets this error (so that nobody can use their certificates to log in); then 
>> the fallback "login" view kicks in, and gets the traceback shown here;
>> Traceback:
>> File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in 
>> get_response
>>   115. response = callback(request, 
>> *callback_args, **callback_kwargs)
>> File "/var/www/lauri/dj/ncis_gui/ncis_gui/src/ncis_gui.py" in login
>>   244. return views.login(request, *args, template_name='login.html', 
>> extra_context=ncis_context, **kwargs)
>> File "/usr/lib/python2.6/site-packages/django/views/decorators/debug.py" 
>> in sensitive_post_parameters_wrapper
>>   75. return view(request, *args, **kwargs)
>> File "/usr/lib/python2.6/site-packages/django/utils/decorators.py" in 
>> _wrapped_view
>>   91. response = view_func(request, *args, **kwargs)
>> File "/usr/lib/python2.6/site-packages/django/views/decorators/cache.py" 
>> in _wrapped_view_func
>>   89. response = view_func(request, *args, **kwargs)
>> File "/usr/lib/python2.6/site-packages/django/contrib/auth/views.py" in 
>> login
>>   53.     form = authentication_form(request)
>> File "/usr/lib/python2.6/site-packages/django/contrib/auth/forms.py" in 
>> __init__
>>   177. UserModel = get_user_model()
>> File "/usr/lib/python2.6/site-packages/django/contrib/auth/__init__.py" 
>> in get_user_model
>>   129. raise ImproperlyConfigured("AUTH_USER_MODEL refers to 
>> model '%s' that has not been installed" % settings.AUTH_USER_MODEL)
>>
>> Exception Type: ImproperlyConfigured at /login/
>> Exception Value: AUTH_USER_MODEL refers to model 'auth.User' that has not 
>> been installed
>>
>>
>> After googling and reading whatever I could find on the subject (most 
>> notably 
>> http://procrastinatingdev.com/django/using-configurable-user-models-in-django-1-5/
>>  where 
>> it expressly says that if you're happy with the existing stuff you don't 
>> have to change any code) -- I am thoroughly vexed.
>>
>> What migration step have I missed in order to really use the stuff we 
>> were using before without changes?
>>
>> -- lauri
>>
>>
> Is 'django.contrib.auth' included in your INSTALLED_APPS? Potentially 
> Django is stricter about this now than it used to be.
> --
> DR. 
>

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Lauri Carpenter
I don't think we used a custom User model in Django 1.3, but perhaps we did 
without knowing it.  How would I know for sure?  We aren't setting any 
AUTH_USER_*** anything in our settings file, that's certain.

- We use django-admin.py syncdb to create the authentication tables and 
whatever else is needed for the INSTALLED_APPS, where our installed_apps 
looks like:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
)

The tables created are:
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_groups
Creating table auth_user_user_permissions
Creating table auth_user
Creating table django_content_type
Creating table django_session
Creating table django_site

- We do not use django to generate our database, we use a different tool 
(dezign).Dezign generates a "create_db.sql" script from an ER diagram. 
 A Makefile runs the "create_db.sql" script to create the tables after the 
original django-admin.py command has created the initial administrative 
tables.  We add one foreign key constraint to one of our tables 
(client_certificates.user_id references auth_user.id). 

- We use django-admin.py inspectdb (plus automated massaging of that 
output) to generate the models.  Our models do include classes all of the 
admin tables listed above.

So, are we using the django user model, or a custom model?  I would think 
we are using the django user model, but...

-- lauri

On Thursday, September 19, 2013 2:21:49 AM UTC-5, Leo wrote:
>
> A question to better understand your problem: do you use a custom User 
> model in Django 1.3?
> Did you perhaps set the AUTH_USER_MODEL=auth.User in your settings.py?
>
> If you do not need a custom user model just drop the AUTH_USER_MODEL 
> setting variable. Otherwise subclassthe AbstractBaseUser and set your 
> application's user model in the settings.py file.
>
> Let me know if I correctly understood your issue.
>
> Regards
>
> Leonardo Giordani
> Author of The Digital Cat <http://lgiordani.github.com>
> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub 
> page <https://github.com/lgiordani> - My Coderwall 
> profile<https://coderwall.com/lgiordani>
>  
>
> 2013/9/18 Lauri Carpenter <lauri.loebe...@gmail.com >
>
>> We have been using django 1.3.0 for a long time.  We are now trying to 
>> migrate to 1.5.4.  We have not changed any schema or model information.  We 
>> have been using two layers of middleware and backends (notably something 
>> based on SSLAuth Django App to authenticate first by certificate issued 
>> from a trusted authority, then django_auth_ldap to login via ldap if no 
>> valid certificate is presented). Both of these live on top of whatever 
>> user/certificate/client/etc. scheme is supported in django 1.3.0.
>>
>> But under django 1.5.4 we are 
>> seeing django.core.exceptions.ImproperlyConfigured exceptions 
>> "AUTH_USER_MODEL refers to model 'auth.User' that has not been installed" 
>> on the gui page when trying to log in.  The chunk'o'code that handles 
>> looking for certificate and creating a user if the certificate is presented 
>> gets this error (so that nobody can use their certificates to log in); then 
>> the fallback "login" view kicks in, and gets the traceback shown here;
>> Traceback:
>> File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in 
>> get_response
>>   115. response = callback(request, 
>> *callback_args, **callback_kwargs)
>> File "/var/www/lauri/dj/ncis_gui/ncis_gui/src/ncis_gui.py" in login
>>   244. return views.login(request, *args, template_name='login.html', 
>> extra_context=ncis_context, **kwargs)
>> File "/usr/lib/python2.6/site-packages/django/views/decorators/debug.py" 
>> in sensitive_post_parameters_wrapper
>>   75. return view(request, *args, **kwargs)
>> File "/usr/lib/python2.6/site-packages/django/utils/decorators.py" in 
>> _wrapped_view
>>   91. response = view_func(request, *args, **kwargs)
>> File "/usr/lib/python2.6/site-packages/django/views/decorators/cache.py" 
>> in _wrapped_view_func
>>   89. response = view_func(request, *args, **kwargs)
>> File "/usr/lib/python2.6/site-packages/django/contrib/auth/views.py" in 
>> login
>>   53. form = authentication_form(request)
>> File "/usr/lib/python2.6/site-packages/django/contrib/auth/forms.py" in 
>> __init__
>>   177. UserModel = get_user_model()
>

Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Leonardo Giordani
A question to better understand your problem: do you use a custom User
model in Django 1.3?
Did you perhaps set the AUTH_USER_MODEL=auth.User in your settings.py?

If you do not need a custom user model just drop the AUTH_USER_MODEL
setting variable. Otherwise subclassthe AbstractBaseUser and set your
application's user model in the settings.py file.

Let me know if I correctly understood your issue.

Regards

Leonardo Giordani
Author of The Digital Cat <http://lgiordani.github.com>
My profile on About.me <http://about.me/leonardo.giordani> - My GitHub
page<https://github.com/lgiordani>- My Coderwall
profile <https://coderwall.com/lgiordani>


2013/9/18 Lauri Carpenter <lauri.loebel.carpen...@gmail.com>

> We have been using django 1.3.0 for a long time.  We are now trying to
> migrate to 1.5.4.  We have not changed any schema or model information.  We
> have been using two layers of middleware and backends (notably something
> based on SSLAuth Django App to authenticate first by certificate issued
> from a trusted authority, then django_auth_ldap to login via ldap if no
> valid certificate is presented). Both of these live on top of whatever
> user/certificate/client/etc. scheme is supported in django 1.3.0.
>
> But under django 1.5.4 we are
> seeing django.core.exceptions.ImproperlyConfigured exceptions
> "AUTH_USER_MODEL refers to model 'auth.User' that has not been installed"
> on the gui page when trying to log in.  The chunk'o'code that handles
> looking for certificate and creating a user if the certificate is presented
> gets this error (so that nobody can use their certificates to log in); then
> the fallback "login" view kicks in, and gets the traceback shown here;
> Traceback:
> File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in
> get_response
>   115. response = callback(request,
> *callback_args, **callback_kwargs)
> File "/var/www/lauri/dj/ncis_gui/ncis_gui/src/ncis_gui.py" in login
>   244. return views.login(request, *args, template_name='login.html',
> extra_context=ncis_context, **kwargs)
> File "/usr/lib/python2.6/site-packages/django/views/decorators/debug.py"
> in sensitive_post_parameters_wrapper
>   75. return view(request, *args, **kwargs)
> File "/usr/lib/python2.6/site-packages/django/utils/decorators.py" in
> _wrapped_view
>   91. response = view_func(request, *args, **kwargs)
> File "/usr/lib/python2.6/site-packages/django/views/decorators/cache.py"
> in _wrapped_view_func
>   89. response = view_func(request, *args, **kwargs)
> File "/usr/lib/python2.6/site-packages/django/contrib/auth/views.py" in
> login
>   53. form = authentication_form(request)
> File "/usr/lib/python2.6/site-packages/django/contrib/auth/forms.py" in
> __init__
>   177. UserModel = get_user_model()
> File "/usr/lib/python2.6/site-packages/django/contrib/auth/__init__.py" in
> get_user_model
>   129. raise ImproperlyConfigured("AUTH_USER_MODEL refers to model
> '%s' that has not been installed" % settings.AUTH_USER_MODEL)
>
> Exception Type: ImproperlyConfigured at /login/
> Exception Value: AUTH_USER_MODEL refers to model 'auth.User' that has not
> been installed
>
>
> After googling and reading whatever I could find on the subject (most
> notably
> http://procrastinatingdev.com/django/using-configurable-user-models-in-django-1-5/
>  where
> it expressly says that if you're happy with the existing stuff you don't
> have to change any code) -- I am thoroughly vexed.
>
> What migration step have I missed in order to really use the stuff we were
> using before without changes?
>
> -- lauri
>
>  --
> 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.
> 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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-18 Thread Russell Keith-Magee
On Thu, Sep 19, 2013 at 1:51 AM, Lauri Carpenter <
lauri.loebel.carpen...@gmail.com> wrote:

> We have been using django 1.3.0 for a long time.  We are now trying to
> migrate to 1.5.4.  We have not changed any schema or model information.  We
> have been using two layers of middleware and backends (notably something
> based on SSLAuth Django App to authenticate first by certificate issued
> from a trusted authority, then django_auth_ldap to login via ldap if no
> valid certificate is presented). Both of these live on top of whatever
> user/certificate/client/etc. scheme is supported in django 1.3.0.
>
> But under django 1.5.4 we are
> seeing django.core.exceptions.ImproperlyConfigured exceptions
> "AUTH_USER_MODEL refers to model 'auth.User' that has not been installed"
> on the gui page when trying to log in.  The chunk'o'code that handles
> looking for certificate and creating a user if the certificate is presented
> gets this error (so that nobody can use their certificates to log in); then
> the fallback "login" view kicks in, and gets the traceback shown here;
> Traceback:
> File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in
> get_response
>   115. response = callback(request,
> *callback_args, **callback_kwargs)
> File "/var/www/lauri/dj/ncis_gui/ncis_gui/src/ncis_gui.py" in login
>   244. return views.login(request, *args, template_name='login.html',
> extra_context=ncis_context, **kwargs)
> File "/usr/lib/python2.6/site-packages/django/views/decorators/debug.py"
> in sensitive_post_parameters_wrapper
>   75. return view(request, *args, **kwargs)
> File "/usr/lib/python2.6/site-packages/django/utils/decorators.py" in
> _wrapped_view
>   91. response = view_func(request, *args, **kwargs)
> File "/usr/lib/python2.6/site-packages/django/views/decorators/cache.py"
> in _wrapped_view_func
>   89. response = view_func(request, *args, **kwargs)
> File "/usr/lib/python2.6/site-packages/django/contrib/auth/views.py" in
> login
>   53. form = authentication_form(request)
> File "/usr/lib/python2.6/site-packages/django/contrib/auth/forms.py" in
> __init__
>   177. UserModel = get_user_model()
> File "/usr/lib/python2.6/site-packages/django/contrib/auth/__init__.py" in
> get_user_model
>   129. raise ImproperlyConfigured("AUTH_USER_MODEL refers to model
> '%s' that has not been installed" % settings.AUTH_USER_MODEL)
>
> Exception Type: ImproperlyConfigured at /login/
> Exception Value: AUTH_USER_MODEL refers to model 'auth.User' that has not
> been installed
>
>
> After googling and reading whatever I could find on the subject (most
> notably
> http://procrastinatingdev.com/django/using-configurable-user-models-in-django-1-5/
>  where
> it expressly says that if you're happy with the existing stuff you don't
> have to change any code) -- I am thoroughly vexed.
>
> What migration step have I missed in order to really use the stuff we were
> using before without changes?
>

It's difficult to answer without knowing more about your actual setup. I
don't know anything about the SSLAuth or django_auth_ldap apps, so I don't
know what they're doing internally. However, because they're doing fun
things with Django 1.3 authentication, it's possible they might be bending
some rules, making some model changes via monkey patching, or doing
otherwise unexpected things with auth.

In this case, the error you're getting is caused because the auth.User
model wasn't found in the app cache. This could be because
django.contrib.auth isn't in INSTALLED_APPS, or because one of the apps
you're using is patching the contents of the app cache for some reason.

Sorry I can't be more helpful here - if you can point us at the exact
repositories you're using for SSL auth and auth_ldap, it might be possible
to provide some more assistance.

Yours,
Russ Magee %-)

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-18 Thread Daniel Roseman
On Wednesday, 18 September 2013 18:51:30 UTC+1, Lauri Carpenter wrote:

> We have been using django 1.3.0 for a long time.  We are now trying to 
> migrate to 1.5.4.  We have not changed any schema or model information.  We 
> have been using two layers of middleware and backends (notably something 
> based on SSLAuth Django App to authenticate first by certificate issued 
> from a trusted authority, then django_auth_ldap to login via ldap if no 
> valid certificate is presented). Both of these live on top of whatever 
> user/certificate/client/etc. scheme is supported in django 1.3.0.
>
> But under django 1.5.4 we are 
> seeing django.core.exceptions.ImproperlyConfigured exceptions 
> "AUTH_USER_MODEL refers to model 'auth.User' that has not been installed" 
> on the gui page when trying to log in.  The chunk'o'code that handles 
> looking for certificate and creating a user if the certificate is presented 
> gets this error (so that nobody can use their certificates to log in); then 
> the fallback "login" view kicks in, and gets the traceback shown here;
> Traceback:
> File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in 
> get_response
>   115. response = callback(request, 
> *callback_args, **callback_kwargs)
> File "/var/www/lauri/dj/ncis_gui/ncis_gui/src/ncis_gui.py" in login
>   244. return views.login(request, *args, template_name='login.html', 
> extra_context=ncis_context, **kwargs)
> File "/usr/lib/python2.6/site-packages/django/views/decorators/debug.py" 
> in sensitive_post_parameters_wrapper
>   75. return view(request, *args, **kwargs)
> File "/usr/lib/python2.6/site-packages/django/utils/decorators.py" in 
> _wrapped_view
>   91. response = view_func(request, *args, **kwargs)
> File "/usr/lib/python2.6/site-packages/django/views/decorators/cache.py" 
> in _wrapped_view_func
>   89. response = view_func(request, *args, **kwargs)
> File "/usr/lib/python2.6/site-packages/django/contrib/auth/views.py" in 
> login
>   53. form = authentication_form(request)
> File "/usr/lib/python2.6/site-packages/django/contrib/auth/forms.py" in 
> __init__
>   177. UserModel = get_user_model()
> File "/usr/lib/python2.6/site-packages/django/contrib/auth/__init__.py" in 
> get_user_model
>   129. raise ImproperlyConfigured("AUTH_USER_MODEL refers to model 
> '%s' that has not been installed" % settings.AUTH_USER_MODEL)
>
> Exception Type: ImproperlyConfigured at /login/
> Exception Value: AUTH_USER_MODEL refers to model 'auth.User' that has not 
> been installed
>
>
> After googling and reading whatever I could find on the subject (most 
> notably 
> http://procrastinatingdev.com/django/using-configurable-user-models-in-django-1-5/
>  where 
> it expressly says that if you're happy with the existing stuff you don't 
> have to change any code) -- I am thoroughly vexed.
>
> What migration step have I missed in order to really use the stuff we were 
> using before without changes?
>
> -- lauri
>
>
Is 'django.contrib.auth' included in your INSTALLED_APPS? Potentially 
Django is stricter about this now than it used to be.
--
DR. 

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-18 Thread Lauri Carpenter
We have been using django 1.3.0 for a long time.  We are now trying to 
migrate to 1.5.4.  We have not changed any schema or model information.  We 
have been using two layers of middleware and backends (notably something 
based on SSLAuth Django App to authenticate first by certificate issued 
from a trusted authority, then django_auth_ldap to login via ldap if no 
valid certificate is presented). Both of these live on top of whatever 
user/certificate/client/etc. scheme is supported in django 1.3.0.

But under django 1.5.4 we are 
seeing django.core.exceptions.ImproperlyConfigured exceptions 
"AUTH_USER_MODEL refers to model 'auth.User' that has not been installed" 
on the gui page when trying to log in.  The chunk'o'code that handles 
looking for certificate and creating a user if the certificate is presented 
gets this error (so that nobody can use their certificates to log in); then 
the fallback "login" view kicks in, and gets the traceback shown here;
Traceback:
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in 
get_response
  115. response = callback(request, *callback_args, 
**callback_kwargs)
File "/var/www/lauri/dj/ncis_gui/ncis_gui/src/ncis_gui.py" in login
  244. return views.login(request, *args, template_name='login.html', 
extra_context=ncis_context, **kwargs)
File "/usr/lib/python2.6/site-packages/django/views/decorators/debug.py" in 
sensitive_post_parameters_wrapper
  75. return view(request, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/django/utils/decorators.py" in 
_wrapped_view
  91. response = view_func(request, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/django/views/decorators/cache.py" in 
_wrapped_view_func
  89. response = view_func(request, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/django/contrib/auth/views.py" in 
login
  53. form = authentication_form(request)
File "/usr/lib/python2.6/site-packages/django/contrib/auth/forms.py" in 
__init__
  177. UserModel = get_user_model()
File "/usr/lib/python2.6/site-packages/django/contrib/auth/__init__.py" in 
get_user_model
  129. raise ImproperlyConfigured("AUTH_USER_MODEL refers to model 
'%s' that has not been installed" % settings.AUTH_USER_MODEL)

Exception Type: ImproperlyConfigured at /login/
Exception Value: AUTH_USER_MODEL refers to model 'auth.User' that has not 
been installed


After googling and reading whatever I could find on the subject (most 
notably 
http://procrastinatingdev.com/django/using-configurable-user-models-in-django-1-5/
 where 
it expressly says that if you're happy with the existing stuff you don't 
have to change any code) -- I am thoroughly vexed.

What migration step have I missed in order to really use the stuff we were 
using before without changes?

-- lauri

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django throws ImproperlyConfigured error when loading URLconf on startup

2013-06-23 Thread Pratik Mandrekar
Has anyone been able to resolve this?

I am facing the same issue.

On Sunday, March 24, 2013 8:46:26 PM UTC+5:30, Dan Gentry wrote:
>
> Andrei, I once received this error when the problem was actually in 
> another python module being imported - in my case views.py.  Hope this 
> helps, Dan

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before access

2013-04-25 Thread Iftikhar Ali


> but while testing and pychecker i am getting this error how should i 
> configure DJANGO_SETTINGS_MODULE
>

-- 
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: ImproperlyConfigured: Requested setting USE_I18N, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before access

2013-04-25 Thread Tom Evans
On Thu, Apr 25, 2013 at 2:56 PM, Iftikhar Ali  wrote:
> when i am running the project it is running perfectly fine but when i am
> trying to open django-admin.py shell the error:

Don;t use django-admin to launch the shell, only use django-admin to
create projects¹. Once you have created your project using
django-admin.py, use the manage.py script it created inside your
project to interact in any with it - creating apps, running syncdb,
accessing the project shell.

See the docs here:

https://docs.djangoproject.com/en/1.5/ref/django-admin/#django-admin-py-and-manage-py

The reason you want to use manage.py over django-admin,py is that
manage.py can usually find your settings automatically - it
automatically sets the environment variable DJANGO_SETTINGS_MODULE to
the correct value.

Cheers

Tom

¹ Or standalone apps. For apps within the project, you use manage.py
startapp, like everything else in the project.

-- 
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.




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

2013-04-25 Thread Iftikhar Ali
when i am running the project it is running perfectly fine but when i am 
trying to open django-admin.py shell the error:

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

is generated. Not only when opening the django-admin.py shell but also when 
testing and using pychecker. 
i follow the doc.djangoproject and opened the python shell and append the 
projectname.setting to  the sys.path. when i import first time it is ok but 
when i come out of python shell and re enter to the shell the 
projectname.setting is missing from the sys.path

i am totally blank what is going on around here can any body have the 
solution for this thanks in advance you guyz..

-- 
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: Django throws ImproperlyConfigured error when loading URLconf on startup

2013-03-24 Thread Dan Gentry
Andrei, I once received this error when the problem was actually in another 
python module being imported - in my case views.py.  Hope this helps, Dan

-- 
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: Django throws ImproperlyConfigured error when loading URLconf on startup

2013-03-20 Thread Andrei
Hi again,

I have managed to run into the issue on a project not using Django CMS. It 
also runs gunicorn with gevent.

Andrei

On Thursday, November 29, 2012 12:03:10 AM UTC+1, Michael Dippery wrote:
>
> I have a Django app running on a production server. It is handled with 
> gunicorn 0.14.2 behind nginx. When I reload the app (by reloading the 
> gunicorn workers), I get this error: 
>
> --- 
> Traceback (most recent call last): 
>
>  File 
> "/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/handlers/base.py",
>  
> line 101, in get_response 
>request.path_info) 
>
>  File 
> "/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/urlresolvers.py",
>  
> line 250, in resolve 
>for pattern in self.url_patterns: 
>
>  File 
> "/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/urlresolvers.py",
>  
> line 283, in _get_url_patterns 
>raise ImproperlyConfigured("The included urlconf %s doesn't have any 
> patterns in it" % self.urlconf_name) 
>
> ImproperlyConfigured: The included urlconf myapp.urls doesn't have any 
> patterns in it 
> --- 
>
> Others with this problem have commonly noted that it occurs while using 
> reverse in a URLconf, but I am not using reverse in any URLconfs (nor are 
> they used in any third-party apps). Also, this error only occurs in 
> production -- never in development (using the Django dev server) or on my 
> staging server (also using gunicorn 0.14.2 behind nginx). It also doesn't 
> seem to cause trouble with the site at any other time then during reloads. 
> And it only happens for the first 10-20 requests on the website (which 
> makes me wonder if it's some sort of race condition, perhaps). 
>
> Any ideas what's causing the problem?

-- 
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: Django throws ImproperlyConfigured error when loading URLconf on startup

2013-02-15 Thread Andrei
Have you guys found a solution for this? This happens on one of our servers 
that uses Django CMS and relies on gevent worker. Others using gevent work 
fine. I am investigating other differences. Any suggestions?

Django==1.4.3
django-cms==2.3.1
eventlet==0.9.17
gevent==0.13.7
greenlet==0.4.0
gunicorn==0.14.6

Andrei


On Monday, December 3, 2012 6:48:12 AM UTC+1, Garth Cumming wrote:
>
> I've noticed this same behaviour as well but only with a higher loaded 
> production server and using the gunicorn gevent class, i've never seen this 
> happen with a sync class.
>
> I'll take a wild guess that gevent worker class is handling requests 
> before django has had a chance to initialize. Perhaps django does some sort 
> of blocking on startup and the gevent monkey patching prevents this 
> blocking behaviour on startup. Just a wild guess.
>
> On Wednesday, November 28, 2012 3:03:10 PM UTC-8, Michael Dippery wrote:
>>
>> I have a Django app running on a production server. It is handled with 
>> gunicorn 0.14.2 behind nginx. When I reload the app (by reloading the 
>> gunicorn workers), I get this error: 
>>
>> --- 
>> Traceback (most recent call last): 
>>
>>  File 
>> "/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/handlers/base.py",
>>  
>> line 101, in get_response 
>>request.path_info) 
>>
>>  File 
>> "/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/urlresolvers.py",
>>  
>> line 250, in resolve 
>>for pattern in self.url_patterns: 
>>
>>  File 
>> "/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/urlresolvers.py",
>>  
>> line 283, in _get_url_patterns 
>>raise ImproperlyConfigured("The included urlconf %s doesn't have any 
>> patterns in it" % self.urlconf_name) 
>>
>> ImproperlyConfigured: The included urlconf myapp.urls doesn't have any 
>> patterns in it 
>> --- 
>>
>> Others with this problem have commonly noted that it occurs while using 
>> reverse in a URLconf, but I am not using reverse in any URLconfs (nor are 
>> they used in any third-party apps). Also, this error only occurs in 
>> production -- never in development (using the Django dev server) or on my 
>> staging server (also using gunicorn 0.14.2 behind nginx). It also doesn't 
>> seem to cause trouble with the site at any other time then during reloads. 
>> And it only happens for the first 10-20 requests on the website (which 
>> makes me wonder if it's some sort of race condition, perhaps). 
>>
>> Any ideas what's causing the problem?
>
>

-- 
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: Django-allauth: ImproperlyConfigured at /accounts/login/ No Facebook app configured: please add a SocialApp using the Django admin

2012-12-26 Thread Manu
Hi Gabriel, 

Thanks for replying. However, the issue, I think, came up because of the 
incorrect SITE_ID value in my settings.py. 
You can see the conversation at this stackoverflow thread. 
http://stackoverflow.com/questions/14019017/django-allauth-no-facebook-app-configured-please-add-a-socialapp-using-the-djan
 


It's solved for now. :-)
Regards,
Manu

On Tuesday, 25 December 2012 20:16:27 UTC+5:30, Gabriel - Iulian Dumbrava 
wrote:
>
> Hi Manu,
> Enter the admin and at allauth -> apps add a new application of type 
> "Facebook" with your FB credentials. 
>
> You have added a facebook login in settings.py but such a login type is 
> not yet defined in admin. 
>
> I hope this helps!
> Gabriel
>
>

-- 
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/-/NQC82_En1v8J.
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.



Django-allauth: ImproperlyConfigured at /accounts/login/ No Facebook app configured: please add a SocialApp using the Django admin

2012-12-25 Thread Gabriel - Iulian Dumbrava
Hi Manu,
Enter the admin and at allauth -> apps add a new application of type "Facebook" 
with your FB credentials. 

You have added a facebook login in settings.py but such a login type is not yet 
defined in admin. 

I hope this helps!
Gabriel

-- 
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/-/TU7blvngKOEJ.
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.



Django-allauth: ImproperlyConfigured at /accounts/login/ No Facebook app configured: please add a SocialApp using the Django admin

2012-12-24 Thread Manu
Hi, 
I'm facing this error when I access 'accounts/login/'. Posted a question 
here - http://stackoverflow.com/q/14019017/1218897
I would really appreciate any help with it.

Thanks in advance.
-Manu

-- 
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/-/kENl6tSAZDsJ.
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: Django throws ImproperlyConfigured error when loading URLconf on startup

2012-12-03 Thread Garth Cumming
I've noticed this same behaviour as well but only with a higher loaded 
production server and using the gunicorn gevent class, i've never seen this 
happen with a sync class.

I'll take a wild guess that gevent worker class is handling requests before 
django has had a chance to initialize. Perhaps django does some sort of 
blocking on startup and the gevent monkey patching prevents this blocking 
behaviour on startup. Just a wild guess.

On Wednesday, November 28, 2012 3:03:10 PM UTC-8, Michael Dippery wrote:
>
> I have a Django app running on a production server. It is handled with 
> gunicorn 0.14.2 behind nginx. When I reload the app (by reloading the 
> gunicorn workers), I get this error: 
>
> --- 
> Traceback (most recent call last): 
>
>  File 
> "/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/handlers/base.py",
>  
> line 101, in get_response 
>request.path_info) 
>
>  File 
> "/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/urlresolvers.py",
>  
> line 250, in resolve 
>for pattern in self.url_patterns: 
>
>  File 
> "/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/urlresolvers.py",
>  
> line 283, in _get_url_patterns 
>raise ImproperlyConfigured("The included urlconf %s doesn't have any 
> patterns in it" % self.urlconf_name) 
>
> ImproperlyConfigured: The included urlconf myapp.urls doesn't have any 
> patterns in it 
> --- 
>
> Others with this problem have commonly noted that it occurs while using 
> reverse in a URLconf, but I am not using reverse in any URLconfs (nor are 
> they used in any third-party apps). Also, this error only occurs in 
> production -- never in development (using the Django dev server) or on my 
> staging server (also using gunicorn 0.14.2 behind nginx). It also doesn't 
> seem to cause trouble with the site at any other time then during reloads. 
> And it only happens for the first 10-20 requests on the website (which 
> makes me wonder if it's some sort of race condition, perhaps). 
>
> Any ideas what's causing the problem?

-- 
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/-/KhaMhHaubnEJ.
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.



Django throws ImproperlyConfigured error when loading URLconf on startup

2012-11-28 Thread Michael Dippery
I have a Django app running on a production server. It is handled with gunicorn 
0.14.2 behind nginx. When I reload the app (by reloading the gunicorn workers), 
I get this error:

---
Traceback (most recent call last):

 File 
"/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/handlers/base.py", 
line 101, in get_response
   request.path_info)

 File 
"/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/urlresolvers.py", 
line 250, in resolve
   for pattern in self.url_patterns:

 File 
"/opt/app/venv/myapp/lib/python2.6/site-packages/django/core/urlresolvers.py", 
line 283, in _get_url_patterns
   raise ImproperlyConfigured("The included urlconf %s doesn't have any 
patterns in it" % self.urlconf_name)

ImproperlyConfigured: The included urlconf myapp.urls doesn't have any patterns 
in it
---

Others with this problem have commonly noted that it occurs while using reverse 
in a URLconf, but I am not using reverse in any URLconfs (nor are they used in 
any third-party apps). Also, this error only occurs in production -- never in 
development (using the Django dev server) or on my staging server (also using 
gunicorn 0.14.2 behind nginx). It also doesn't seem to cause trouble with the 
site at any other time then during reloads. And it only happens for the first 
10-20 requests on the website (which makes me wonder if it's some sort of race 
condition, perhaps).

Any ideas what's causing the problem?

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: ImproperlyConfigured at /

2012-08-20 Thread Satinderpal Singh
On Mon, Aug 20, 2012 at 5:24 PM, Amyth Arora  wrote:
> Hey,
Thanks for the kind help.
>
> seems you are using django 1.4. FYI ->
Yes, you are right.
> django.template.loaders.app_directories.load_template_source has been
> deprecated so you should rather use
> django.template.loaders.app_directories.Loader
I had already added this to my file, but i made a mistake that i did
not remove the load_template_source.
Thanks again, it works for me.
> Just change :
>
> django.template.loaders.app_directories.load_template_source
> TO
> django.template.loaders.app_directories.Loader

> in the TEMPLATE_LOADERS dictionary in your settings.py file and it
> should have it fixed.
>
>
> On Mon, Aug 20, 2012 at 4:30 PM, Satinderpal Singh
>  wrote:
>> I have to deploy osmeditor on my system, and download code from the
>> link: http://wiki.openstreetmap.org/wiki/Editors/Django
>> The database used in this was postgis, but i have mysql on my system,
>> as the tables was successfully made by changing in the settings.py
>> file, but on running it in the browser, it gives the following error:
>>
>> Error importing template source loader
>> django.template.loaders.filesystem.load_template_source: "'module'
>> object has no attribute 'load_template_source'"
>>
>> If anybody helps me to solve the problem. Thanks in advance.
>>
>> --
>> Satinderpal Singh
>> http://satindergoraya.blogspot.in/
>>
>> --
>> 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 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> --
> Thanks & Regards
> 
>
> Amyth [Admin - Techstricks]
> Email - aroras.offic...@gmail.com, ad...@techstricks.com
> Twitter - @a_myth_
> http://techstricks.com/
>
> --
> 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 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Satinderpal Singh
http://satindergoraya.blogspot.in/

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: ImproperlyConfigured at /

2012-08-20 Thread Amyth Arora
Hey,

seems you are using django 1.4. FYI ->
django.template.loaders.app_directories.load_template_source has been
deprecated so you should rather use
django.template.loaders.app_directories.Loader

Just change :

django.template.loaders.app_directories.load_template_source
TO
django.template.loaders.app_directories.Loader

in the TEMPLATE_LOADERS dictionary in your settings.py file and it
should have it fixed.


On Mon, Aug 20, 2012 at 4:30 PM, Satinderpal Singh
 wrote:
> I have to deploy osmeditor on my system, and download code from the
> link: http://wiki.openstreetmap.org/wiki/Editors/Django
> The database used in this was postgis, but i have mysql on my system,
> as the tables was successfully made by changing in the settings.py
> file, but on running it in the browser, it gives the following error:
>
> Error importing template source loader
> django.template.loaders.filesystem.load_template_source: "'module'
> object has no attribute 'load_template_source'"
>
> If anybody helps me to solve the problem. Thanks in advance.
>
> --
> Satinderpal Singh
> http://satindergoraya.blogspot.in/
>
> --
> 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 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Thanks & Regards


Amyth [Admin - Techstricks]
Email - aroras.offic...@gmail.com, ad...@techstricks.com
Twitter - @a_myth_
http://techstricks.com/

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



ImproperlyConfigured at /

2012-08-20 Thread Satinderpal Singh
I have to deploy osmeditor on my system, and download code from the
link: http://wiki.openstreetmap.org/wiki/Editors/Django
The database used in this was postgis, but i have mysql on my system,
as the tables was successfully made by changing in the settings.py
file, but on running it in the browser, it gives the following error:

Error importing template source loader
django.template.loaders.filesystem.load_template_source: "'module'
object has no attribute 'load_template_source'"

If anybody helps me to solve the problem. Thanks in advance.

-- 
Satinderpal Singh
http://satindergoraya.blogspot.in/

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: help with rss feed ImproperlyConfigured

2012-07-07 Thread psychok7
anyone??

On Saturday, July 7, 2012 3:52:52 AM UTC+1, psychok7 wrote:
>
> hi, i am trying to implement the syndicate feed framework simple rss with 
> my program, but i get a ImproperlyConfigured at /latest/feed/
>
> Give your Debt class a get_absolute_url() method, or define an item_link() 
> method in your Feed class.
>
> I know i am supposed to create a get_absolute_url in my Debt model, but i 
> dont know how to do it (already seen tutorials but cant make it work)
>
> model: 
>
> class Debt (models.Model): 
>
>  user = models.ForeignKey(User) 
>
>  debt_name = models.TextField() 
>
>  creation_date = models.DateTimeField('date created') 
>
>  due_date = models.DateTimeField('due date') 
>
>  info = models.TextField() 
>
>  is_owing = models.BooleanField() 
>
>  is_payed = models.BooleanField()
>
>  def __unicode__(self):
> return self.debt_name
>
>
>

-- 
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/-/QTr8HDaFi6AJ.
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: help with rss feed ImproperlyConfigured

2012-07-06 Thread psychok7
on my feed.py i have 

class LatestEntriesFeed(Feed):
title = "Chicagocrime.org site news"
link = "/blog/"
description = "Recent Posts"

def items(self):
return Debt.objects.all().order_by('-creation_date')[:10]


can anyone help me?

On Saturday, July 7, 2012 3:52:52 AM UTC+1, psychok7 wrote:
>
> hi, i am trying to implement the syndicate feed framework simple rss with 
> my program, but i get a ImproperlyConfigured at /latest/feed/
>
> Give your Debt class a get_absolute_url() method, or define an item_link() 
> method in your Feed class.
>
> I know i am supposed to create a get_absolute_url in my Debt model, but i 
> dont know how to do it (already seen tutorials but cant make it work)
>
> model: 
>
> class Debt (models.Model): 
>
>  user = models.ForeignKey(User) 
>
>  debt_name = models.TextField() 
>
>  creation_date = models.DateTimeField('date created') 
>
>  due_date = models.DateTimeField('due date') 
>
>  info = models.TextField() 
>
>  is_owing = models.BooleanField() 
>
>  is_payed = models.BooleanField()
>
>  def __unicode__(self):
> return self.debt_name
>
>
>

-- 
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/-/Q8HyQT5lnWoJ.
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.



help with rss feed ImproperlyConfigured

2012-07-06 Thread psychok7
hi, i am trying to implement the syndicate feed framework simple rss with 
my program, but i get a ImproperlyConfigured at /latest/feed/

Give your Debt class a get_absolute_url() method, or define an item_link() 
method in your Feed class.

I know i am supposed to create a get_absolute_url in my Debt model, but i dont 
know how to do it (already seen tutorials but cant make it work)

model: 

class Debt (models.Model): 

 user = models.ForeignKey(User) 

 debt_name = models.TextField() 

 creation_date = models.DateTimeField('date created') 

 due_date = models.DateTimeField('due date') 

 info = models.TextField() 

 is_owing = models.BooleanField() 

 is_payed = models.BooleanField()

 def __unicode__(self):
return self.debt_name


-- 
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/-/cs2jbuw6zaAJ.
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: guardian: I get ImproperlyConfigured error, but I have set ANONYMOUS_USER_ID in projectName/projectName/settings.py

2012-04-24 Thread su
"from userena.models import UserenaBaseProfile " in settings.py cause this 
problem.

-- 
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/-/AA_cMGHU4XYJ.
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: guardian: I get ImproperlyConfigured error, but I have set ANONYMOUS_USER_ID in projectName/projectName/settings.py

2012-04-22 Thread su
I got this error when I syncdb.

在 2012年4月23日星期一UTC+8上午11时51分18秒,BFSchott写道:
>
> This should work:
>
> # django-guardian requires an anonymous user
> ANONYMOUS_USER_ID = -1
>
> Also, I think you need to "python manage.py syncdb" the first time you use 
> it.
>
> Brian Schott
> bfsch...@gmail.com
>
>
>  
> On Apr 22, 2012, at 11:41 PM, su wrote:
>
> I set  ANONYMOUS_USER_ID  in my project setting.
> It doesn't work.
>
>
> Error message:
> ---
>
>
> Traceback (most recent call last):
>   File "manage.py", line 10, in 
> execute_from_command_line(sys.argv)
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
> line 443, in execute_from_command_line
> utility.execute()
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
> line 382, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
> line 252, in fetch_command
> app_name = get_commands()[subcommand]
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
> line 101, in get_commands
> apps = settings.INSTALLED_APPS
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 
> 184, in inner
> self._setup()
>   File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", 
> line 42, in _setup
> self._wrapped = Settings(settings_module)
>   File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", 
> line 93, in __init__
> mod = importlib.import_module(self.SETTINGS_MODULE)
>   File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", 
> line 35, in import_module
> __import__(name)
>   File "/home/su/document/django/simpleSNS/simpleSNS/settings.py", line 8, 
> in 
> from userena.models import UserenaBaseProfile
>   File "/usr/local/lib/python2.7/dist-packages/userena/models.py", line 
> 12, in 
> from userena.managers import UserenaManager, UserenaBaseProfileManager
>   File "/usr/local/lib/python2.7/dist-packages/userena/managers.py", line 
> 11, in 
> from guardian.shortcuts import assign, get_perms
>   File "/usr/local/lib/python2.7/dist-packages/guardian/shortcuts.py", 
> line 9, in 
> from guardian.core import ObjectPermissionChecker
>   File "/usr/local/lib/python2.7/dist-packages/guardian/core.py", line 7, 
> in 
> from guardian.utils import get_identity
>   File "/usr/local/lib/python2.7/dist-packages/guardian/utils.py", line 
> 11, in 
> from guardian.conf.settings import ANONYMOUS_USER_ID
>   File "/usr/local/lib/python2.7/dist-packages/guardian/conf/settings.py", 
> line 6, in 
> raise ImproperlyConfigured("In order to use django-guardian's "
> django.core.exceptions.ImproperlyConfigured: In order to use 
> django-guardian's ObjectPermissionBackend authorization backend you have to 
> configure ANONYMOUS_USER_ID at your settings module
>
>
> -- 
> 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/-/BY1w2ckqa34J.
> 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.
>
>
>

-- 
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/-/Uy_8FQThbp0J.
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: guardian: I get ImproperlyConfigured error, but I have set ANONYMOUS_USER_ID in projectName/projectName/settings.py

2012-04-22 Thread Brian Schott
This should work:

# django-guardian requires an anonymous user
ANONYMOUS_USER_ID = -1

Also, I think you need to "python manage.py syncdb" the first time you use it.

Brian Schott
bfsch...@gmail.com



On Apr 22, 2012, at 11:41 PM, su wrote:

> I set  ANONYMOUS_USER_ID  in my project setting.
> It doesn't work.
> 
> 
> Error message:
> ---
> 
> 
> Traceback (most recent call last):
>   File "manage.py", line 10, in 
> execute_from_command_line(sys.argv)
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
> line 443, in execute_from_command_line
> utility.execute()
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
> line 382, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
> line 252, in fetch_command
> app_name = get_commands()[subcommand]
>   File 
> "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
> line 101, in get_commands
> apps = settings.INSTALLED_APPS
>   File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", 
> line 184, in inner
> self._setup()
>   File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 
> 42, in _setup
> self._wrapped = Settings(settings_module)
>   File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 
> 93, in __init__
> mod = importlib.import_module(self.SETTINGS_MODULE)
>   File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", 
> line 35, in import_module
> __import__(name)
>   File "/home/su/document/django/simpleSNS/simpleSNS/settings.py", line 8, in 
> 
> from userena.models import UserenaBaseProfile
>   File "/usr/local/lib/python2.7/dist-packages/userena/models.py", line 12, 
> in 
> from userena.managers import UserenaManager, UserenaBaseProfileManager
>   File "/usr/local/lib/python2.7/dist-packages/userena/managers.py", line 11, 
> in 
> from guardian.shortcuts import assign, get_perms
>   File "/usr/local/lib/python2.7/dist-packages/guardian/shortcuts.py", line 
> 9, in 
> from guardian.core import ObjectPermissionChecker
>   File "/usr/local/lib/python2.7/dist-packages/guardian/core.py", line 7, in 
> 
> from guardian.utils import get_identity
>   File "/usr/local/lib/python2.7/dist-packages/guardian/utils.py", line 11, 
> in 
> from guardian.conf.settings import ANONYMOUS_USER_ID
>   File "/usr/local/lib/python2.7/dist-packages/guardian/conf/settings.py", 
> line 6, in 
> raise ImproperlyConfigured("In order to use django-guardian's "
> django.core.exceptions.ImproperlyConfigured: In order to use 
> django-guardian's ObjectPermissionBackend authorization backend you have to 
> configure ANONYMOUS_USER_ID at your settings module
> 
> 
> -- 
> 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/-/BY1w2ckqa34J.
> 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.



smime.p7s
Description: S/MIME cryptographic signature


guardian: I get ImproperlyConfigured error, but I have set ANONYMOUS_USER_ID in projectName/projectName/settings.py

2012-04-22 Thread su
I set  ANONYMOUS_USER_ID  in my project setting.
It doesn't work.


Error message:
---


Traceback (most recent call last):
  File "manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 443, in execute_from_command_line
utility.execute()
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 252, in fetch_command
app_name = get_commands()[subcommand]
  File 
"/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 101, in get_commands
apps = settings.INSTALLED_APPS
  File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", 
line 184, in inner
self._setup()
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", 
line 42, in _setup
self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", 
line 93, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py", 
line 35, in import_module
__import__(name)
  File "/home/su/document/django/simpleSNS/simpleSNS/settings.py", line 8, 
in 
from userena.models import UserenaBaseProfile
  File "/usr/local/lib/python2.7/dist-packages/userena/models.py", line 12, 
in 
from userena.managers import UserenaManager, UserenaBaseProfileManager
  File "/usr/local/lib/python2.7/dist-packages/userena/managers.py", line 
11, in 
from guardian.shortcuts import assign, get_perms
  File "/usr/local/lib/python2.7/dist-packages/guardian/shortcuts.py", line 
9, in 
from guardian.core import ObjectPermissionChecker
  File "/usr/local/lib/python2.7/dist-packages/guardian/core.py", line 7, 
in 
from guardian.utils import get_identity
  File "/usr/local/lib/python2.7/dist-packages/guardian/utils.py", line 11, 
in 
from guardian.conf.settings import ANONYMOUS_USER_ID
  File "/usr/local/lib/python2.7/dist-packages/guardian/conf/settings.py", 
line 6, in 
raise ImproperlyConfigured("In order to use django-guardian's "
django.core.exceptions.ImproperlyConfigured: In order to use 
django-guardian's ObjectPermissionBackend authorization backend you have to 
configure ANONYMOUS_USER_ID at your settings module

-- 
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/-/BY1w2ckqa34J.
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: cx_Oracle error: ImproperlyConfigured

2011-04-29 Thread Jirka Vejrazka
Have you checked permissions?

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-28 Thread kamal sharma
Yes you are correct, that the reason i have replaced the below line in
"app.wsgi", but that does not works.

#os.environ["LD_LIBRARY_PATH"] = "/opt/app/oracle/products/11.2.0/lib"
#os.environ["ORACLE_HOME"] = "/opt/app/oracle/products/11.2.0"

os.environ["LD_LIBRARY_PATH"] = "/opt/app/oracle/products/10.2.0/lib"
os.environ["ORACLE_HOME"] = "/opt/app/oracle/products/10.2.0"

Thanks,



On Fri, Apr 29, 2011 at 2:10 AM, Jirka Vejrazka wrote:

> Kamal, this is exactly the same error you were getting before. Are you
> sure that you have ORACLE_HOME properly set on your new client and in
> the right environment?
>
>  Cheers
>
>  Jirka
>
> On 28/04/2011, kamal sharma  wrote:
> > Hi Again,
> >
> > I have finished my implementation with the local db, but now stuck in
> major
> > issue.When i try to login to the local oracle database then it is working
> > perfectly fine.I am able to read the data from the db installed in the
> > same UNIX machine.
> >
> > But when i tried to login a db installed in remote machine, which is
> > installed in the client side, then getting following error.
> >
> > Traceback (most recent call last):
> >   File "test_db.py", line 8, in ?
> > connection = cx_Oracle.Connection("%s/%s@%s" % ('user', 'user123',
> > 'db'))
> > cx_Oracle.DatabaseError: ORA-01804: failure to initialize timezone
> > information
> >
> > Also at the client machine the Oracle is (10.2.0)
> > "/opt/app/oracle/products/10.2.0", but in my machine it
> > is /opt/app/oracle/products/11.2.0 (11.2.0).
> >
> >
> > Earlier i was using like this in my CGI-Perl code, now i have to migrate
> > this in Django-Python module to use the below logic.How we can solve this
> > problem?
> >
> > # Add ORACLE_HOME for 10g Oracle client.
> > BEGIN { $ENV{ORACLE_HOME} = '/opt/app/oracle/products/10.2.0' }
> >
> > Any help will be highly appreciated.
> >
> > Thanks,
> > Kamal
> >
> > On Tue, Apr 26, 2011 at 10:22 PM, kamal sharma
> > wrote:
> >
> >> Thanks to all for supporting this to fix the issue.
> >>
> >> So issue is resolved by adding these 2 lines in "app.wsgi"
> >>
> >> os.environ["LD_LIBRARY_PATH"] = "/opt/app/oracle/products/11.2.0/lib"
> >> os.environ["ORACLE_HOME"] = "/opt/app/oracle/products/11.2.0"
> >>
> >> Thanks again for helping to fix this issue. Its really a superb forum to
> >> fix the issue so quickly. :-)
> >>
> >> Regards,
> >> Kamal
> >>
> >> On Sun, Apr 24, 2011 at 7:58 PM, Ian  wrote:
> >>
> >>> On Apr 23, 12:29 pm, kamal sharma  wrote:
> >>> > No it was .profile of mine. Now I have set the LD_LIBRARY_PATH in
> >>> app.wsgi
> >>> > as mentioned below and when I print the os.environ in the beginning
> of
> >>> > views.py then it shows that newly added value.
> >>>
> >>> It's clear that your LD_LIBRARY_PATH is fine at this point, since the
> >>> library must be loaded in order to get the ORA-01804 error.  The
> >>> problem, as Jirka and I have suggested, is that the rest of your
> >>> Oracle installation is still not visible to the process, which is
> >>> preventing the client from reading its data files.  Why this is the
> >>> case is unclear without knowing more details about your system.  Is
> >>> the Oracle directory readable by the WSGI user?  Is the WSGI process
> >>> running inside a chroot jail?
> >>>
> >>> --
> >>> 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
> >>> django-users+unsubscr...@googlegroups.com.
> >>> For more options, visit this group at
> >>> http://groups.google.com/group/django-users?hl=en.
> >>>
> >>>
> >>
> >
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-28 Thread kamal sharma
Hi Again,

I have finished my implementation with the local db, but now stuck in major
issue.When i try to login to the local oracle database then it is working
perfectly fine.I am able to read the data from the db installed in the
same UNIX machine.

But when i tried to login a db installed in remote machine, which is
installed in the client side, then getting following error.

Traceback (most recent call last):
  File "test_db.py", line 8, in ?
connection = cx_Oracle.Connection("%s/%s@%s" % ('user', 'user123',
'db'))
cx_Oracle.DatabaseError: ORA-01804: failure to initialize timezone
information

Also at the client machine the Oracle is (10.2.0)
"/opt/app/oracle/products/10.2.0", but in my machine it
is /opt/app/oracle/products/11.2.0 (11.2.0).


Earlier i was using like this in my CGI-Perl code, now i have to migrate
this in Django-Python module to use the below logic.How we can solve this
problem?

# Add ORACLE_HOME for 10g Oracle client.
BEGIN { $ENV{ORACLE_HOME} = '/opt/app/oracle/products/10.2.0' }

Any help will be highly appreciated.

Thanks,
Kamal

On Tue, Apr 26, 2011 at 10:22 PM, kamal sharma wrote:

> Thanks to all for supporting this to fix the issue.
>
> So issue is resolved by adding these 2 lines in "app.wsgi"
>
> os.environ["LD_LIBRARY_PATH"] = "/opt/app/oracle/products/11.2.0/lib"
> os.environ["ORACLE_HOME"] = "/opt/app/oracle/products/11.2.0"
>
> Thanks again for helping to fix this issue. Its really a superb forum to
> fix the issue so quickly. :-)
>
> Regards,
> Kamal
>
> On Sun, Apr 24, 2011 at 7:58 PM, Ian  wrote:
>
>> On Apr 23, 12:29 pm, kamal sharma  wrote:
>> > No it was .profile of mine. Now I have set the LD_LIBRARY_PATH in
>> app.wsgi
>> > as mentioned below and when I print the os.environ in the beginning of
>> > views.py then it shows that newly added value.
>>
>> It's clear that your LD_LIBRARY_PATH is fine at this point, since the
>> library must be loaded in order to get the ORA-01804 error.  The
>> problem, as Jirka and I have suggested, is that the rest of your
>> Oracle installation is still not visible to the process, which is
>> preventing the client from reading its data files.  Why this is the
>> case is unclear without knowing more details about your system.  Is
>> the Oracle directory readable by the WSGI user?  Is the WSGI process
>> running inside a chroot jail?
>>
>> --
>> 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
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-26 Thread kamal sharma
Thanks to all for supporting this to fix the issue.

So issue is resolved by adding these 2 lines in "app.wsgi"

os.environ["LD_LIBRARY_PATH"] = "/opt/app/oracle/products/11.2.0/lib"
os.environ["ORACLE_HOME"] = "/opt/app/oracle/products/11.2.0"

Thanks again for helping to fix this issue. Its really a superb forum to fix
the issue so quickly. :-)

Regards,
Kamal

On Sun, Apr 24, 2011 at 7:58 PM, Ian  wrote:

> On Apr 23, 12:29 pm, kamal sharma  wrote:
> > No it was .profile of mine. Now I have set the LD_LIBRARY_PATH in
> app.wsgi
> > as mentioned below and when I print the os.environ in the beginning of
> > views.py then it shows that newly added value.
>
> It's clear that your LD_LIBRARY_PATH is fine at this point, since the
> library must be loaded in order to get the ORA-01804 error.  The
> problem, as Jirka and I have suggested, is that the rest of your
> Oracle installation is still not visible to the process, which is
> preventing the client from reading its data files.  Why this is the
> case is unclear without knowing more details about your system.  Is
> the Oracle directory readable by the WSGI user?  Is the WSGI process
> running inside a chroot jail?
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-24 Thread Ian
On Apr 23, 12:29 pm, kamal sharma  wrote:
> No it was .profile of mine. Now I have set the LD_LIBRARY_PATH in app.wsgi
> as mentioned below and when I print the os.environ in the beginning of
> views.py then it shows that newly added value.

It's clear that your LD_LIBRARY_PATH is fine at this point, since the
library must be loaded in order to get the ORA-01804 error.  The
problem, as Jirka and I have suggested, is that the rest of your
Oracle installation is still not visible to the process, which is
preventing the client from reading its data files.  Why this is the
case is unclear without knowing more details about your system.  Is
the Oracle directory readable by the WSGI user?  Is the WSGI process
running inside a chroot jail?

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-23 Thread kamal sharma
No it was .profile of mine. Now I have set the LD_LIBRARY_PATH in app.wsgi
as mentioned below and when I print the os.environ in the beginning of
views.py then it shows that newly added value.

os.environ["LD_LIBRARY_PATH"] = "/opt/app/oracle/products/11.2.0/lib"

Is there any problem in this statement for connecting the database? The
error show in this line only. I tried all the 3 way, but nothing is working.

connection = cx_Oracle.Connection("%s/%s@%s" % ('foo', 'baar', 'db'))
connection = cx_Oracle.connect("foo/baar@db")
connection = cx_Oracle.connect('foo/baar@db')


But Still the issue is not resolved.

Thanks,

On Sat, Apr 23, 2011 at 2:42 AM, Jirka Vejrazka <jirka.vejra...@gmail.com>wrote:

> .profile of which user? Yours or the one running webserver? Have you
> confirmed that these are set (e.g. by writing those to a file at the
> beginning of your views.py)?
>
>  Cheers
>
>Jirka
>
> On 22/04/2011, kamal sharma <kamalp.sha...@gmail.com> wrote:
> > Yes, i am getting this error when i used from the web application. Also
> all
> > the
> > user have the permission to webserver to read all Oracle client files.
> >
> > Not sure how it got set to LD_LIBRARY_PATH
> > /opt/apache-2.2.16/lib:/usr/local/lib:
> >
> > I have defined the LD_LIBRARY_PATH and ORACLE_HOME as follows in .profile
> >
> > export ORACLE_HOME=/opt/app/oracle/products/11.2.0
> > export LD_LIBRARY_PATH=/opt/app/oracle/products/11.2.0/lib
> >
> > Also tried it in .cshrc file also. But nothing is working.
> >
> > setenv ORACLE_HOME "/opt/app/oracle/products/11.2.0"
> > setenv LD_LIBRARY_PATH "$ORACLE_HOME/lib32:$ORACLE_HOME/lib"
> > setenv LD_LIBRARY_PATH /usr/X11R6/lib:/usr/local/lib
> >
> >
> > I have written a sample script and it works, when i run from the command
> > prompt.
> >
> > filename: test_db.py
> > import cx_Oracle
> > from pprint import pprint
> >
> > connection = cx_Oracle.Connection("%s/%s@%s" % ('foo', 'bar', 'db'))
> > cursor = cx_Oracle.Cursor(connection)
> > sql = "SELECT name FROM prs where rownum < 10"
> > cursor.execute(sql)
> > data = cursor.fetchall()
> > pprint(data)
> > cursor.close()
> > connection.close()
> >
> > Getting proper output:
> >
> > [me] ~/install_cx_oracle> /usr/local/bin/python test_db.py
> > [('Robert Craig',),
> >  ('Darren Kerr',),
> >  ('Aviva Garrett',),
> >  ('Pasvorn Boonmark',),
> >  ('Dave Wittbrodt',),
> >  ('Pasvorn Boonmark',),
> >  ('Rajkumaran Chandrasekaran',),
> >  ('Pasvorn Boonmark',),
> >  ('Pasvorn Boonmark',)]
> >
> >  But samething when i write in django views.py then getting exception.
> >
> >
> > Request Method: GET
> > Request URL: https://server/web/test/cases
> > Django Version: 1.2.1
> > Exception Type: DatabaseError
> > Exception Value: Error while trying to retrieve text for error ORA-01804
> > Exception Location: /web/views.py in cases, line 43
> > Python Executable: /bin/python
> > Python Version: 2.6.6
> >
> > Thanks,
> >
> >
> >
> > On Thu, Apr 21, 2011 at 3:37 PM, kamalp.sha...@gmail.com <
> > kamalp.sha...@gmail.com> wrote:
> >
> >> Hi,
> >>
> >> I have installed cx_Oracle module in one of my Solaris box and then
> >> trying to create a django page to read data from oracle db. But I am
> >> getting following errors.
> >>
> >>
> >> mod_wsgi (pid=2600): Exception occurred processing WSGI script '/opt/
> >> www/ui/foo/web/app.wsgi'.
> >> Traceback (most recent call last):
> >> File "/opt/www/ui/foo/web/app.wsgi", line 30, in application
> >> return _application(environ, start_response)
> >> File "/usr/local/packages/python/2.6.6/lib/python2.6/site-packages/
> >> django/core/handlers/wsgi.py", line 230, in __call__
> >> self.load_middleware()
> >> File "/usr/local/packages/python/2.6.6/lib/python2.6/site-packages/
> >> django/core/handlers/base.py", line 42, in load_middleware
> >> raise exceptions.ImproperlyConfigured('Error importing middleware %s:
> >> "%s"' % (mw_module, e))
> >> ImproperlyConfigured: Error importing middleware web.web.framework:
> >> "ld.so.1: httpd: fatal: libclntsh.so.11.1: open failed: No such file
> >> or directory"
> >>
> >>
> >> I have tried from python shell and i can able to import cx_Oracle
> >> module as foll

Re: cx_Oracle error: ImproperlyConfigured

2011-04-22 Thread kamal sharma
Yes, i am getting this error when i used from the web application. Also all the
user have the permission to webserver to read all Oracle client files.

Not sure how it got set to LD_LIBRARY_PATH
/opt/apache-2.2.16/lib:/usr/local/lib:

I have defined the LD_LIBRARY_PATH and ORACLE_HOME as follows in .profile

export ORACLE_HOME=/opt/app/oracle/products/11.2.0
export LD_LIBRARY_PATH=/opt/app/oracle/products/11.2.0/lib

Also tried it in .cshrc file also. But nothing is working.

setenv ORACLE_HOME "/opt/app/oracle/products/11.2.0"
setenv LD_LIBRARY_PATH "$ORACLE_HOME/lib32:$ORACLE_HOME/lib"
setenv LD_LIBRARY_PATH /usr/X11R6/lib:/usr/local/lib


I have written a sample script and it works, when i run from the command
prompt.

filename: test_db.py
import cx_Oracle
from pprint import pprint

connection = cx_Oracle.Connection("%s/%s@%s" % ('foo', 'bar', 'db'))
cursor = cx_Oracle.Cursor(connection)
sql = "SELECT name FROM prs where rownum < 10"
cursor.execute(sql)
data = cursor.fetchall()
pprint(data)
cursor.close()
connection.close()

Getting proper output:

[me] ~/install_cx_oracle> /usr/local/bin/python test_db.py
[('Robert Craig',),
 ('Darren Kerr',),
 ('Aviva Garrett',),
 ('Pasvorn Boonmark',),
 ('Dave Wittbrodt',),
 ('Pasvorn Boonmark',),
 ('Rajkumaran Chandrasekaran',),
 ('Pasvorn Boonmark',),
 ('Pasvorn Boonmark',)]

 But samething when i write in django views.py then getting exception.


Request Method: GET
Request URL: https://server/web/test/cases
Django Version: 1.2.1
Exception Type: DatabaseError
Exception Value: Error while trying to retrieve text for error ORA-01804
Exception Location: /web/views.py in cases, line 43
Python Executable: /bin/python
Python Version: 2.6.6

Thanks,



On Thu, Apr 21, 2011 at 3:37 PM, kamalp.sha...@gmail.com <
kamalp.sha...@gmail.com> wrote:

> Hi,
>
> I have installed cx_Oracle module in one of my Solaris box and then
> trying to create a django page to read data from oracle db. But I am
> getting following errors.
>
>
> mod_wsgi (pid=2600): Exception occurred processing WSGI script '/opt/
> www/ui/foo/web/app.wsgi'.
> Traceback (most recent call last):
> File "/opt/www/ui/foo/web/app.wsgi", line 30, in application
> return _application(environ, start_response)
> File "/usr/local/packages/python/2.6.6/lib/python2.6/site-packages/
> django/core/handlers/wsgi.py", line 230, in __call__
> self.load_middleware()
> File "/usr/local/packages/python/2.6.6/lib/python2.6/site-packages/
> django/core/handlers/base.py", line 42, in load_middleware
> raise exceptions.ImproperlyConfigured('Error importing middleware %s:
> "%s"' % (mw_module, e))
> ImproperlyConfigured: Error importing middleware web.web.framework:
> "ld.so.1: httpd: fatal: libclntsh.so.11.1: open failed: No such file
> or directory"
>
>
> I have tried from python shell and i can able to import cx_Oracle
> module as follows:
>
> bash-3.00$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
> bash-3.00$ python
> Python 2.4.4 (#1, Jan 10 2007, 01:25:01) [C] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import cx_Oracle
> >>>
>
> But from the web I am getting the ImproperlyConfigured: configured
> error. Can someone please help me to resolve this issue.
>
> FYI,
>
> I have followed this link to install cx_oracle module.
>
> http://agiletesting.blogspot.com/2005/05/installing-and-using-cxoracle-on-unix.html
>
> Please let me know if you need more info.
>
> Thanks,
> Kamal
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-22 Thread kamal sharma
I think i have done a mistake in my last cx_Oracle installation. Is this a
problem? I used one python while build and another while install.

ex: [me] ~/install_cx_oracle/cx_Oracle-5.0.3> /usr/local/bin/python setup.py
build
  [me] ~/install_cx_oracle/cx_Oracle-5.0.3> sudo python setup.py install

Now i am trying again, but not able to install.

[weevil] ~/install_cx_oracle/cx_Oracle-5.0.3> sudo /usr/local/bin/python
setup.py build install
running build
running build_ext
running install
running bdist_egg
running egg_info
creating cx_Oracle.egg-info
error: could not create 'cx_Oracle.egg-info': Permission denied

How to resolve this?

Thanks,
Kamal

On Fri, Apr 22, 2011 at 7:53 PM, Ian  wrote:

> On Apr 21, 11:40 pm, kamal sharma  wrote:
> > When i try the same code from python Shell then it is working fine.
>
> Okay, so it does sound to me like it's your web server blocking access
> to the entire ORACLE_HOME directory.
>
> Is it running under a chroot jail?  If so, then you will need to copy
> your entire Oracle client installation into the jail and use the
> chrooted path for your ORACLE_HOME and LD_LIBRARY_PATH.
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-22 Thread Jirka Vejrazka
Are you getting this error only when using the app through a web server?
Have you verified that the web server does have ORACLE_HOME and
LD_LIBRARY_PATH correctly defined? (e.g. by logging it using os.environ).

Are you sure that the user that is used to run your webserver has
permissions to read all Oracle client files?

 Just thinking "loudly" :)

   Jirka

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-22 Thread Ian
On Apr 21, 11:40 pm, kamal sharma  wrote:
> When i try the same code from python Shell then it is working fine.

Okay, so it does sound to me like it's your web server blocking access
to the entire ORACLE_HOME directory.

Is it running under a chroot jail?  If so, then you will need to copy
your entire Oracle client installation into the jail and use the
chrooted path for your ORACLE_HOME and LD_LIBRARY_PATH.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-22 Thread kamal sharma
Hi Jirka,

Thanks for the response.

I have installed cx_Oracle in Solaris again and followed this steps but
still the error is same:

Exception Type:DatabaseErrorException Value:

Error while trying to retrieve text for error ORA-01804


Download cx_oracle module:
http://sourceforge.net/projects/cx-oracle/files/5.0.3/cx_Oracle-5.0.3.tar.gz/download

Install:

[me] ~/install_cx_oracle/cx_Oracle-5.0.3> gunzip cx_Oracle-5.0.3.tar.gz
[me] ~/install_cx_oracle/cx_Oracle-5.0.3> tar xvf cx_Oracle-5.0.3.tar
[me] ~/install_cx_oracle/cx_Oracle-5.0.3> cd cx_Oracle-5.0.3
[me] ~/install_cx_oracle/cx_Oracle-5.0.3> /usr/local/bin/python setup.py
build
running build
running build_ext
building 'cx_Oracle' extension
creating build
creating build/temp.solaris-2.10-sun4u-2.6-11g
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -fPIC -I/opt/app/oracle/products/11.2.0/rdbms/demo
-I/opt/app/oracle/products/11.2.0/rdbms/public
-I/usr/local/stow/python/include/python2.6 -c cx_Oracle.c -o
build/temp.solaris-2.10-sun4u-2.6-11g/cx_Oracle.o -DBUILD_VERSION=5.0.3
In file included from
/opt/app/oracle/products/11.2.0/rdbms/public/oci.h:3024,
 from cx_Oracle.c:10:
/opt/app/oracle/products/11.2.0/rdbms/public/ociap.h:10788: warning:
function declaration isn't a prototype
/opt/app/oracle/products/11.2.0/rdbms/public/ociap.h:10794: warning:
function declaration isn't a prototype
creating build/lib.solaris-2.10-sun4u-2.6-11g
gcc -shared build/temp.solaris-2.10-sun4u-2.6-11g/cx_Oracle.o
-L/opt/app/oracle/products/11.2.0/lib -L/opt/app/oracle/products/11.2.0 -L.
-lclntsh -lpython2.6 -o build/lib.solaris-2.10-sun4u-2.6-11g/cx_Oracle.so

[me] ~/install_cx_oracle/cx_Oracle-5.0.3> echo $ORACLE_HOME/
/opt/app/oracle/products/11.2.0/

[me] ~/install_cx_oracle/cx_Oracle-5.0.3> sudo python setup.py install
Password:
running install
running build
running build_ext
running install_lib
copying build/lib.solaris-2.10-sun4u-2.4-11g/cx_Oracle.so ->
/usr/lib/python2.4/site-packages

[me] ~/install_cx_oracle/cx_Oracle-5.0.3> python
Python 2.4.4 (#1, Jan 10 2007, 01:25:01) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
>>> cx_Oracle.version
'5.0.3'

Did i missed something?

Thanks,
Kamal

On Fri, Apr 22, 2011 at 3:20 PM, Jirka Vejrazka wrote:

> Hi Kamal,
>
>   checking my install history, this is what I had to do to use
> cx_Oracle on Ubuntu Server:
>
> $ /usr/local/oracle/instantclient_11_2$ ln -s libclntsh.so.11.1
> libclntsh.so
> $ WITH_UNICODE=1 ORACLE_HOME=/usr/local/oracle/instantclient_11_2
> python setup.py build
> $ sudo bash
> # WITH_UNICODE=1 ORACLE_HOME=/usr/local/oracle/instantclient_11_2
> python setup.py install
>
> and tested:
> $ export
> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/oracle/instantclient_11_2
> $ python
> Python 2.5.2 (r252:60911, Jan 20 2010, 21:48:48)
> [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import cx_Oracle
> >>> cx_Oracle.version
> '5.0.3'
>
> Then I added the LD_LIBRARY_PATH to /etc/profile so it'd be used by
> all users, including the Apache process.
>
> The error you're getting is most likely caused by ORACLE_HOME not
> being set during cx_Oracle installation. To be extra sure, consider
> adding it to /etc/profile too.
>
>
>  HTH
>
>Jirka
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-22 Thread Jirka Vejrazka
Hi Kamal,

  checking my install history, this is what I had to do to use
cx_Oracle on Ubuntu Server:

$ /usr/local/oracle/instantclient_11_2$ ln -s libclntsh.so.11.1 libclntsh.so
$ WITH_UNICODE=1 ORACLE_HOME=/usr/local/oracle/instantclient_11_2
python setup.py build
$ sudo bash
# WITH_UNICODE=1 ORACLE_HOME=/usr/local/oracle/instantclient_11_2
python setup.py install

and tested:
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/oracle/instantclient_11_2
$ python
Python 2.5.2 (r252:60911, Jan 20 2010, 21:48:48)
[GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
>>> cx_Oracle.version
'5.0.3'

Then I added the LD_LIBRARY_PATH to /etc/profile so it'd be used by
all users, including the Apache process.

The error you're getting is most likely caused by ORACLE_HOME not
being set during cx_Oracle installation. To be extra sure, consider
adding it to /etc/profile too.


  HTH

Jirka

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread kamal sharma
When i try the same code from python Shell then it is working fine.

Here is the working output:
>>> import cx_Oracle
>>> from pprint import pprint
>>> connection = cx_Oracle.Connection("%s/%s@%s" % ('foo', 'bar', 'db'))
>>> cursor = cx_Oracle.Cursor(connection)
>>> sql = "SELECT xyz FROM table_name where rownum < 10"
>>> cursor.execute(sql)
[]
>>> data = cursor.fetchall()
>>> pprint(data)
[('Robert Craig',),
 ('Darren Kerr',),
 ('Aviva Garrett',),
 ('Pasvorn Boonmark',),
 ('Dave Wittbrodt',),
 ('Pasvorn Boonmark',),
 ('Rajkumaran Chandrasekaran',),
 ('Pasvorn Boonmark',),
 ('Pasvorn Boonmark',)]


But when i use the same code in django views.py then it does not work
and Getting error as:
Exception Value:

Error while trying to retrieve text for error ORA-01804


def cases(request, db_name, prnum=None, message=''):
connection = cx_Oracle.Connection("%s/%s@%s" % ('foo', 'bar', 'db'))
cursor = cx_Oracle.Cursor(connection)
sql = "SELECT xyz FROM table_name where rownum < 10"
cursor.execute(sql)
data = cursor.fetchall()
pprint(data)
cursor.close()
connection.close()
return render_to_response('web/cases.html', {}, RequestContext(request,
{
 'first': 'test1',
 'last': 'test2',
}))


Thanks,


On Fri, Apr 22, 2011 at 1:01 AM, Ian  wrote:

> On Apr 21, 11:03 am, kamal sharma  wrote:
> > Error while trying to retrieve text for error ORA-01804
> >
> > Here is my code to fetch the data from database.
> >
> > def cases(request, dbname, prnum=None, message=''):
> >
> > connection = cx_Oracle.Connection("%s/%s@%s" % ('foo', 'bar',
> 'xyz'))
> > cursor = cx_Oracle.Cursor(connection)
> > sql = "SELECT fielname FROM tablename where rownum < 10"
> > cursor.execute(sql)
> > names = [row[0] for row in cursor.fetchall()]
> > cursor.close()
> > connection.close()
>
> First of all, why are you creating your own connection instead of
> using the Django ORM?
>
> Anyway, the proper way to create a cx_Oracle connection is with the
> cx_Oracle.connect factory function, and the proper way to create a
> cursor is with the connection.cursor() method.  See the cx_Oracle docs
> and the DB-API docs for details.  However, I think there is something
> more going on here.
>
> ORA-01804:  failure to initialize timezone information
> Cause:  The timezone information file was not properly read.
> Action: Please contact Oracle Customer Support.
>
> This and the fact that cx_Oracle wasn't able to look up the error code
> itself suggest that there may be something wrong with your Oracle
> client installation.  Or it may be that your webserver is also
> blocking access to the files in the client directory.  What happens if
> you try the same code from a Python shell?
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread Ian
On Apr 21, 11:03 am, kamal sharma  wrote:
> Error while trying to retrieve text for error ORA-01804
>
> Here is my code to fetch the data from database.
>
> def cases(request, dbname, prnum=None, message=''):
>
>     connection = cx_Oracle.Connection("%s/%s@%s" % ('foo', 'bar', 'xyz'))
>     cursor = cx_Oracle.Cursor(connection)
>     sql = "SELECT fielname FROM tablename where rownum < 10"
>     cursor.execute(sql)
>     names = [row[0] for row in cursor.fetchall()]
>     cursor.close()
>     connection.close()

First of all, why are you creating your own connection instead of
using the Django ORM?

Anyway, the proper way to create a cx_Oracle connection is with the
cx_Oracle.connect factory function, and the proper way to create a
cursor is with the connection.cursor() method.  See the cx_Oracle docs
and the DB-API docs for details.  However, I think there is something
more going on here.

ORA-01804:  failure to initialize timezone information
Cause:  The timezone information file was not properly read.
Action: Please contact Oracle Customer Support.

This and the fact that cx_Oracle wasn't able to look up the error code
itself suggest that there may be something wrong with your Oracle
client installation.  Or it may be that your webserver is also
blocking access to the files in the client directory.  What happens if
you try the same code from a Python shell?

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread kamal sharma
Thanks a lot. Now that issue is resolved after i execute below command.

sudo ln -s /opt/app/oracle/products/11.2.0/lib/libclntsh.so.11.1

But now i am getting databse error. Any pointer please?

Exception Value:

Error while trying to retrieve text for error ORA-01804


Here is my code to fetch the data from database.

def cases(request, dbname, prnum=None, message=''):

connection = cx_Oracle.Connection("%s/%s@%s" % ('foo', 'bar', 'xyz'))
cursor = cx_Oracle.Cursor(connection)
sql = "SELECT fielname FROM tablename where rownum < 10"
cursor.execute(sql)
names = [row[0] for row in cursor.fetchall()]
cursor.close()
connection.close()

Thanks,
Kamal

On Thu, Apr 21, 2011 at 9:31 PM, kamal sharma wrote:

> After creating soft link, still it is giving the same error. Do i need to
> create soft link for any other files? My response are inline with KS:
>
> On Thu, Apr 21, 2011 at 9:21 PM, Ian  wrote:
>
>> On Apr 21, 9:39 am, kamal sharma  wrote:
>> > Here is the error I am getting now:
>> >
>> > cd /usr/local/lib
>> >
>> > /usr/local/lib> sudo ln
>> > /opt/app/oracle/products/11.2.0/lib/libclntsh.so.10.1
>> > ln: ./libclntsh.so.10.1 is on a different file system
>> >
>> > /usr/local/lib> cd /usr/lib/
>> > /usr/lib> sudo ln /opt/app/oracle/products/11.2.0/lib/libclntsh.so.10.1
>> > ln: ./libclntsh.so.10.1 is on a different file system
>>
>> Right, it's not possible to create hard links across file systems.
>> Create a soft link instead using "ln -s" (soft links are usually
>> preferable anyway).
>>
>
> KS: Ok i have created soft link and it is fine.
>  sudo ln -s /opt/app/oracle/products/11.2.0/lib/libclntsh.so.10.1
>
>>
>> > Also set this in .cshrc file
>> >
>> > setenv LD_LIBRARY_PATH "$ORACLE_HOME/lib32:$ORACLE_HOME/lib"
>> > setenv LD_LIBRARY_PATH /usr/X11R6/lib:/usr/local/lib
>> >
>> > echo $LD_LIBRARY_PATH
>> > /usr/X11R6/lib:/usr/local/lib
>> > echo $ORACLE_HOME/
>> > /opt/app/oracle/products/11.2.0/
>>
>> Is this in your .cshrc file or the WSGI user's .cshrc?  And are you
>> sure it's using csh and not bash?
>>
>
> KS: Yes it  .cshrc file.
>
>>
>> --
>>
>> 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
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread kamal sharma
After creating soft link, still it is giving the same error. Do i need to
create soft link for any other files? My response are inline with KS:

On Thu, Apr 21, 2011 at 9:21 PM, Ian  wrote:

> On Apr 21, 9:39 am, kamal sharma  wrote:
> > Here is the error I am getting now:
> >
> > cd /usr/local/lib
> >
> > /usr/local/lib> sudo ln
> > /opt/app/oracle/products/11.2.0/lib/libclntsh.so.10.1
> > ln: ./libclntsh.so.10.1 is on a different file system
> >
> > /usr/local/lib> cd /usr/lib/
> > /usr/lib> sudo ln /opt/app/oracle/products/11.2.0/lib/libclntsh.so.10.1
> > ln: ./libclntsh.so.10.1 is on a different file system
>
> Right, it's not possible to create hard links across file systems.
> Create a soft link instead using "ln -s" (soft links are usually
> preferable anyway).
>

KS: Ok i have created soft link and it is fine.
 sudo ln -s /opt/app/oracle/products/11.2.0/lib/libclntsh.so.10.1

>
> > Also set this in .cshrc file
> >
> > setenv LD_LIBRARY_PATH "$ORACLE_HOME/lib32:$ORACLE_HOME/lib"
> > setenv LD_LIBRARY_PATH /usr/X11R6/lib:/usr/local/lib
> >
> > echo $LD_LIBRARY_PATH
> > /usr/X11R6/lib:/usr/local/lib
> > echo $ORACLE_HOME/
> > /opt/app/oracle/products/11.2.0/
>
> Is this in your .cshrc file or the WSGI user's .cshrc?  And are you
> sure it's using csh and not bash?
>

KS: Yes it  .cshrc file.

>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread Ian
On Apr 21, 9:39 am, kamal sharma  wrote:
> Here is the error I am getting now:
>
> cd /usr/local/lib
>
> /usr/local/lib> sudo ln
> /opt/app/oracle/products/11.2.0/lib/libclntsh.so.10.1
> ln: ./libclntsh.so.10.1 is on a different file system
>
> /usr/local/lib> cd /usr/lib/
> /usr/lib> sudo ln /opt/app/oracle/products/11.2.0/lib/libclntsh.so.10.1
> ln: ./libclntsh.so.10.1 is on a different file system

Right, it's not possible to create hard links across file systems.
Create a soft link instead using "ln -s" (soft links are usually
preferable anyway).

> Also set this in .cshrc file
>
> setenv LD_LIBRARY_PATH "$ORACLE_HOME/lib32:$ORACLE_HOME/lib"
> setenv LD_LIBRARY_PATH /usr/X11R6/lib:/usr/local/lib
>
> echo $LD_LIBRARY_PATH
> /usr/X11R6/lib:/usr/local/lib
> echo $ORACLE_HOME/
> /opt/app/oracle/products/11.2.0/

Is this in your .cshrc file or the WSGI user's .cshrc?  And are you
sure it's using csh and not bash?

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread kamal sharma
Here is the error I am getting now:

cd /usr/local/lib

/usr/local/lib> sudo ln
/opt/app/oracle/products/11.2.0/lib/libclntsh.so.10.1
ln: ./libclntsh.so.10.1 is on a different file system

/usr/local/lib> cd /usr/lib/
/usr/lib> sudo ln /opt/app/oracle/products/11.2.0/lib/libclntsh.so.10.1
ln: ./libclntsh.so.10.1 is on a different file system

Also set this in .cshrc file

setenv LD_LIBRARY_PATH "$ORACLE_HOME/lib32:$ORACLE_HOME/lib"
setenv LD_LIBRARY_PATH /usr/X11R6/lib:/usr/local/lib

echo $LD_LIBRARY_PATH
/usr/X11R6/lib:/usr/local/lib
echo $ORACLE_HOME/
/opt/app/oracle/products/11.2.0/


Thanks

On Thu, Apr 21, 2011 at 8:23 PM, brad  wrote:

> This may be related to Oracle's shared libraries not being in the path
> recognized by your web server. I created hard links to the Oracle shared
> libraries in /user/local/lib to get cx_oracle working.
>
> I have a blog post that outlines what I did, here:
> http://bradmontgomery.net/blog/gahhh-django-virtualenv-and-cx_oracle/
>
> The comment by Graham Dumpleton is worth reading, as he mentions a few
> other techniques to make this work.
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread brad
This may be related to Oracle's shared libraries not being in the path 
recognized by your web server. I created hard links to the Oracle shared 
libraries in /user/local/lib to get cx_oracle working.

I have a blog post that outlines what I did, here:
http://bradmontgomery.net/blog/gahhh-django-virtualenv-and-cx_oracle/

The comment by Graham Dumpleton is worth reading, as he mentions a few other 
techniques to make this work.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread kamal sharma
Thanks David for quick response. I have already tried that option, but it
does not work.

Here is the diff which i have added.


Index: app.wsgi
===
+os.environ["LD_LIBRARY_PATH"] = "/opt/app/oracle/products/11.2.0/lib"

 # figure out where on disk this gnatatui install is hiding
 base_path = __file__.split('/web/app.wsgi')[0]

Am i missing something?

Thanks,
Kamal

On Thu, Apr 21, 2011 at 4:27 PM, David Markey <ad...@dmarkey.com> wrote:

> At the top of the WSGI script, set the LD_LIBRARY_PATH environment
> variable.
>
>
> On 21 April 2011 11:07, kamalp.sha...@gmail.com 
> <kamalp.sha...@gmail.com>wrote:
>
>> Hi,
>>
>> I have installed cx_Oracle module in one of my Solaris box and then
>> trying to create a django page to read data from oracle db. But I am
>> getting following errors.
>>
>>
>> mod_wsgi (pid=2600): Exception occurred processing WSGI script '/opt/
>> www/ui/foo/web/app.wsgi'.
>> Traceback (most recent call last):
>> File "/opt/www/ui/foo/web/app.wsgi", line 30, in application
>> return _application(environ, start_response)
>> File "/usr/local/packages/python/2.6.6/lib/python2.6/site-packages/
>> django/core/handlers/wsgi.py", line 230, in __call__
>> self.load_middleware()
>> File "/usr/local/packages/python/2.6.6/lib/python2.6/site-packages/
>> django/core/handlers/base.py", line 42, in load_middleware
>> raise exceptions.ImproperlyConfigured('Error importing middleware %s:
>> "%s"' % (mw_module, e))
>> ImproperlyConfigured: Error importing middleware web.web.framework:
>> "ld.so.1: httpd: fatal: libclntsh.so.11.1: open failed: No such file
>> or directory"
>>
>>
>> I have tried from python shell and i can able to import cx_Oracle
>> module as follows:
>>
>> bash-3.00$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
>> bash-3.00$ python
>> Python 2.4.4 (#1, Jan 10 2007, 01:25:01) [C] on sunos5
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> import cx_Oracle
>> >>>
>>
>> But from the web I am getting the ImproperlyConfigured: configured
>> error. Can someone please help me to resolve this issue.
>>
>> FYI,
>>
>> I have followed this link to install cx_oracle module.
>>
>> http://agiletesting.blogspot.com/2005/05/installing-and-using-cxoracle-on-unix.html
>>
>> Please let me know if you need more info.
>>
>> Thanks,
>> Kamal
>>
>> --
>> 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
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>  --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread David Markey
At the top of the WSGI script, set the LD_LIBRARY_PATH environment variable.

On 21 April 2011 11:07, kamalp.sha...@gmail.com <kamalp.sha...@gmail.com>wrote:

> Hi,
>
> I have installed cx_Oracle module in one of my Solaris box and then
> trying to create a django page to read data from oracle db. But I am
> getting following errors.
>
>
> mod_wsgi (pid=2600): Exception occurred processing WSGI script '/opt/
> www/ui/foo/web/app.wsgi'.
> Traceback (most recent call last):
> File "/opt/www/ui/foo/web/app.wsgi", line 30, in application
> return _application(environ, start_response)
> File "/usr/local/packages/python/2.6.6/lib/python2.6/site-packages/
> django/core/handlers/wsgi.py", line 230, in __call__
> self.load_middleware()
> File "/usr/local/packages/python/2.6.6/lib/python2.6/site-packages/
> django/core/handlers/base.py", line 42, in load_middleware
> raise exceptions.ImproperlyConfigured('Error importing middleware %s:
> "%s"' % (mw_module, e))
> ImproperlyConfigured: Error importing middleware web.web.framework:
> "ld.so.1: httpd: fatal: libclntsh.so.11.1: open failed: No such file
> or directory"
>
>
> I have tried from python shell and i can able to import cx_Oracle
> module as follows:
>
> bash-3.00$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
> bash-3.00$ python
> Python 2.4.4 (#1, Jan 10 2007, 01:25:01) [C] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import cx_Oracle
> >>>
>
> But from the web I am getting the ImproperlyConfigured: configured
> error. Can someone please help me to resolve this issue.
>
> FYI,
>
> I have followed this link to install cx_oracle module.
>
> http://agiletesting.blogspot.com/2005/05/installing-and-using-cxoracle-on-unix.html
>
> Please let me know if you need more info.
>
> Thanks,
> Kamal
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



cx_Oracle error: ImproperlyConfigured

2011-04-21 Thread kamalp.sha...@gmail.com
Hi,

I have installed cx_Oracle module in one of my Solaris box and then
trying to create a django page to read data from oracle db. But I am
getting following errors.


mod_wsgi (pid=2600): Exception occurred processing WSGI script '/opt/
www/ui/foo/web/app.wsgi'.
Traceback (most recent call last):
File "/opt/www/ui/foo/web/app.wsgi", line 30, in application
return _application(environ, start_response)
File "/usr/local/packages/python/2.6.6/lib/python2.6/site-packages/
django/core/handlers/wsgi.py", line 230, in __call__
self.load_middleware()
File "/usr/local/packages/python/2.6.6/lib/python2.6/site-packages/
django/core/handlers/base.py", line 42, in load_middleware
raise exceptions.ImproperlyConfigured('Error importing middleware %s:
"%s"' % (mw_module, e))
ImproperlyConfigured: Error importing middleware web.web.framework:
"ld.so.1: httpd: fatal: libclntsh.so.11.1: open failed: No such file
or directory"


I have tried from python shell and i can able to import cx_Oracle
module as follows:

bash-3.00$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
bash-3.00$ python
Python 2.4.4 (#1, Jan 10 2007, 01:25:01) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
>>>

But from the web I am getting the ImproperlyConfigured: configured
error. Can someone please help me to resolve this issue.

FYI,

I have followed this link to install cx_oracle module.
http://agiletesting.blogspot.com/2005/05/installing-and-using-cxoracle-on-unix.html

Please let me know if you need more info.

Thanks,
Kamal

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: ImproperlyConfigured: 'SentAdmin.fields' refers to field 'dateSent' that is missing from the form.

2011-01-08 Thread gintare
I did not understand what was the a reason, but i changed order of
items in admin.py fields to be similar to items order in the model.
Maybe mistake was some mistyping. Anyway error disappeared.

regards,
gintare

On Jan 2, 6:47 pm, Ramiro Morales <cra...@gmail.com> wrote:
> On Sun, Jan 2, 2011 at 12:49 PM,gintare<g.statk...@gmail.com> wrote:
> > I was changing models many times and deleting tables inbetween.
> > New tables were generated to improved models and admin site worked
> > perfectly.
> > Now smth happened that i am getting error:
>
> > ImproperlyConfigured: 'SentAdmin.fields' refers to field 'dateSent'
> > that is missing from the form.
>
> > 'dateSent' is in the model and correctly described in admin.py
>
> > I did not added this field before generating new tables. It was
> > previously.
> > If i comment other fields gives the same error.
>
> > What can be the solution?
> > Should i make new project or there is a way to update forms (for
> > field 'dateSent' and orher fields that are missing from the form
> > according Django) ??
>
> Post only the definitions of the model containing dateSent and
> its ModelAdmin.
>
> Also:
>  Are you using dateSent somethwere else in the dmin.py?
>  Remove the admin.pyc file.
>
> --
> Ramiro Morales

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: ImproperlyConfigured: 'SentAdmin.fields' refers to field 'dateSent' that is missing from the form.

2011-01-02 Thread Ramiro Morales
On Sun, Jan 2, 2011 at 12:49 PM, gintare <g.statk...@gmail.com> wrote:
> I was changing models many times and deleting tables inbetween.
> New tables were generated to improved models and admin site worked
> perfectly.
> Now smth happened that i am getting error:
>
> ImproperlyConfigured: 'SentAdmin.fields' refers to field 'dateSent'
> that is missing from the form.
>
> 'dateSent' is in the model and correctly described in admin.py
>
> I did not added this field before generating new tables. It was
> previously.
> If i comment other fields gives the same error.
>
> What can be the solution?
> Should i make new project or there is a way to update forms (for
> field 'dateSent' and orher fields that are missing from the form
> according Django) ??

Post only the definitions of the model containing dateSent and
its ModelAdmin.

Also:
 Are you using dateSent somethwere else in the dmin.py?
 Remove the admin.pyc file.

-- 
Ramiro Morales

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



ImproperlyConfigured: 'SentAdmin.fields' refers to field 'dateSent' that is missing from the form.

2011-01-02 Thread gintare
I was changing models many times and deleting tables inbetween.
New tables were generated to improved models and admin site worked
perfectly.
Now smth happened that i am getting error:

ImproperlyConfigured: 'SentAdmin.fields' refers to field 'dateSent'
that is missing from the form.

'dateSent' is in the model and correctly described in admin.py

I did not added this field before generating new tables. It was
previously.
If i comment other fields gives the same error.

What can be the solution?
Should i make new project or there is a way to update forms (for
field 'dateSent' and orher fields that are missing from the form
according Django) ??

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



ImproperlyConfigured: Error importing middleware django.middleware.csrf: "No module named csrf" on Windows XP

2010-08-06 Thread Ariel
Hi everybody, I am working on windows XP with django 1.2, I have downloaded
a django web aplication but I continuely get a message error like this:
"ImproperlyConfigured: Error importing middleware django.middleware.csrf:
"No module named csrf" I have not idea why this is happening, could you help
please ??? How could I fix that ???
Regards,
Ariel

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: ImproperlyConfigured: MySQLdb-1.2.1p2 or newer is required; you have 1.2.1 But I HAVE 1.2.2!

2009-03-16 Thread Theme Park Photo, LLC

Thanks, Malcolm! The problem was an old django. I was setting up a new
machine, and I didn't realize that easy_install put an old django on
my machine. When I downloaded the latest 1.0.2 trunk and installed it,
the problem went away

On Mar 15, 9:12 pm, Malcolm Tredinnick <malc...@pointy-stick.com>
wrote:
> On Sun, 2009-03-15 at 21:08 -0700, Theme Park Photo, LLC wrote:
> > I'm getting this message when trying to start Django (from mod_python)
>
> > (From my apache log)
>
> > [Sun Mar 15 22:07:28 2009] [error] [client 67.188.95.50] PythonHandler
> > django.core.handlers.modpython: ImproperlyConfigured: MySQLdb-1.2.1p2
> > or newer is required; you have 1.2.1
>
> > BUT! I have 1.2.2 installed, see:
>
> > bash-3.1$ python manage.py shell
> > Python 2.4.4 (#1, Oct 23 2006, 13:58:00)
> > [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> > (InteractiveConsole)
> > >>> import MySQLdb
> > >>> print MySQLdb
> >  > MySQL_python-1.2.2-py2.4-linux-i686.egg/MySQLdb/__init__.py'>
>
> What does MySQLdb.version_info say? That's what Django is looking at,
> not the name of the package.
>
> Also, what version of Django are you using?
>
> Regards,
> Malcolm
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ImproperlyConfigured: MySQLdb-1.2.1p2 or newer is required; you have 1.2.1 But I HAVE 1.2.2!

2009-03-15 Thread Malcolm Tredinnick

On Sun, 2009-03-15 at 21:08 -0700, Theme Park Photo, LLC wrote:
> I'm getting this message when trying to start Django (from mod_python)
> 
> 
> (From my apache log)
> 
> [Sun Mar 15 22:07:28 2009] [error] [client 67.188.95.50] PythonHandler
> django.core.handlers.modpython: ImproperlyConfigured: MySQLdb-1.2.1p2
> or newer is required; you have 1.2.1
> 
> 
> BUT! I have 1.2.2 installed, see:
> 
> bash-3.1$ python manage.py shell
> Python 2.4.4 (#1, Oct 23 2006, 13:58:00)
> [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> (InteractiveConsole)
> >>> import MySQLdb
> >>> print MySQLdb
>  MySQL_python-1.2.2-py2.4-linux-i686.egg/MySQLdb/__init__.py'>

What does MySQLdb.version_info say? That's what Django is looking at,
not the name of the package.

Also, what version of Django are you using?

Regards,
Malcolm



--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



ImproperlyConfigured: MySQLdb-1.2.1p2 or newer is required; you have 1.2.1 But I HAVE 1.2.2!

2009-03-15 Thread Theme Park Photo, LLC

I'm getting this message when trying to start Django (from mod_python)


(From my apache log)

[Sun Mar 15 22:07:28 2009] [error] [client 67.188.95.50] PythonHandler
django.core.handlers.modpython: ImproperlyConfigured: MySQLdb-1.2.1p2
or newer is required; you have 1.2.1


BUT! I have 1.2.2 installed, see:

bash-3.1$ python manage.py shell
Python 2.4.4 (#1, Oct 23 2006, 13:58:00)
[GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import MySQLdb
>>> print MySQLdb



There's only one python installed on this machine, so it can't be that
mod_python is picking up a different python...

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Random HTTP Error 500's - ImproperlyConfigured

2008-09-03 Thread cwurld

I doubt that would be the cause, given that the module it cannot load
changes from crash to crash.

I was wondering if it could be some sort of timing issue. Maybe the
server times out while looking for the file. Or maybe the file is
temporarily locked? I am grasping at straws here...

--~--~-~--~~~---~--~~
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: Random HTTP Error 500's - ImproperlyConfigured

2008-09-02 Thread James Matthews
Is it possible that some form of server security is stripping them out?

On Tue, Sep 2, 2008 at 10:28 AM, cwurld <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> My site has recently starting generating a lot of HTTP Error 500's.
> The traceback is always:
>
> ImproperlyConfigured: Error importing request processor module xxx:
> "No module named yyy"
>
> where xxx and yyy are random modules. I know these modules are present
> and working correctly. Most of the time all the modules load without
> errors.
>
> Also, it does not seem to matter what page is being requested.
>
> I am using revision 7153.
>
> Thanks,
> Chuck
>
>
>
> >
>


-- 
http://www.goldwatches.com/

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Random HTTP Error 500's - ImproperlyConfigured

2008-09-02 Thread cwurld

Hi,

My site has recently starting generating a lot of HTTP Error 500's.
The traceback is always:

ImproperlyConfigured: Error importing request processor module xxx:
"No module named yyy"

where xxx and yyy are random modules. I know these modules are present
and working correctly. Most of the time all the modules load without
errors.

Also, it does not seem to matter what page is being requested.

I am using revision 7153.

Thanks,
Chuck



--~--~-~--~~~---~--~~
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: Weird ImproperlyConfigured error

2008-09-01 Thread Julien Phalip

> I've spent a couple hours trying to debug this, in vain...

I figured out my problem, so I just thought I'd post it here.

It was in fact due to some stale .pyc files and folders, not in my
apps but in Django itself. I had just done an 'svn update' on it, and
apparently some old stuff kept hanging around. So my best advice to
anybody would be to start from a clean check out when 1.0 storms out.
That'll make you avoid some frustration like I've just been through ;)
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Weird ImproperlyConfigured error

2008-08-30 Thread Julien Phalip

Hi,

I've spent a couple hours trying to debug this, in vain...

I'm setting up a very simple site. In that site I've copied/pasted the
flatpages app to be able to extend it at will (I call the new app
'staticpages').

Everything works fine on the local machine running with the dev
server. But when I run the site on the production server with Apache,
nothing works at all and I get:

mod_wsgi (pid=12338): Exception occurred processing WSGI script '/
MYPATH/myproject.wsgi'.
Traceback (most recent call last):
  File "/MYPATH/django/core/handlers/wsgi.py", line 194, in __call__
self.load_middleware()
  File "/MYPATH/django/core/handlers/base.py", line 40, in
load_middleware
raise exceptions.ImproperlyConfigured, 'Error importing middleware
%s: "%s"' % (mw_module, e)
  ImproperlyConfigured: Error importing middleware
staticpages.middleware: "No module named widgets"

Only removing that middleware from the MIDDLEWARE_CLASSES setting gets
rid of the error.

I thought it was due to some stale *.pyc files, but I started from a
clean checkout and the problem persists.

I really don't understand where it's trying to import that 'widgets'
module. Certainly not from the middleware module, which is the same as
the flatpage's one:
http://code.djangoproject.com/browser/django/trunk/django/contrib/flatpages/middleware.py

The traceback is really not helpful. Would you have any hint to debug
this?

Thanks a lot!

Julien
--~--~-~--~~~---~--~~
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: Mod_Python Error - ImproperlyConfigured: Error loading psycopg module: No module named psycopg

2007-12-05 Thread AY

Good Morning, Thanks for reply my request! Can you show me where/how
to detect the error in psycopg module and how to fix the problem. I
have completed the following steps without any problem. (1) install
Python 2.5.1 windows installer (Python 2.5.1.exe) (2) install
TortoiseSVN-1.4.5.10425-win-svn-1.4.5.msi (3) Install Django 0.96 (4)
Update path variables to include python path (C:\python25; C:
\python25\tools\scripts;c:\python25\scripts) (5) install apache2.2.4-
win32-x86-no_ssl_msi web server (6)Install mod_python-3.3.1win-py2.5-
apache2.2.exe to allow apache and python to talk to each other (7)
install python memchache (python-memcache-1.39.tar.gz (8) download
FacBackOpac.
However I got stuck at (9) configure apache to use facbackopac
directory as a django project. This is my FIRST try to apply Django on
opac and have no idea to solve this mod_python error. Any help will be
very appreciated.  Thanks!



On Dec 4, 10:39 am, "Mauro Sánchez" <[EMAIL PROTECTED]> wrote:
> 2007/12/4, AY <[EMAIL PROTECTED]>:
>
> > Hi! I am trying to configure Apache to use facbackopan directory as a
> > django project, and have the following mod_python error message. Help
> > would be very appreciated. Thanks in advance!
>
> Hi.
>
> > 
> > MOD_PYTHON ERROR
>
> > ImproperlyConfigured: Error loading psycopg module: No module named
> > psycopg
>
> I think that you have an error in the psycopg module. Are you sure it
> is installed correctly? Can you use it outside django?
--~--~-~--~~~---~--~~
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: Mod_Python Error - ImproperlyConfigured: Error loading psycopg module: No module named psycopg

2007-12-04 Thread Mauro Sánchez

2007/12/4, AY <[EMAIL PROTECTED]>:
>
> Hi! I am trying to configure Apache to use facbackopan directory as a
> django project, and have the following mod_python error message. Help
> would be very appreciated. Thanks in advance!
>
Hi.

> 
> MOD_PYTHON ERROR
>
> ImproperlyConfigured: Error loading psycopg module: No module named
> psycopg

I think that you have an error in the psycopg module. Are you sure it
is installed correctly? Can you use it outside django?

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Mod_Python Error - ImproperlyConfigured: Error loading psycopg module: No module named psycopg

2007-12-04 Thread AY

Hi! I am trying to configure Apache to use facbackopan directory as a
django project, and have the following mod_python error message. Help
would be very appreciated. Thanks in advance!


MOD_PYTHON ERROR

ProcessId:  2208
Interpreter:'LocalHost'

ServerName: 'LocalHost'
DocumentRoot:   'C:/Program Files/Apache Software Foundation/Apache2.2/
htdocs'

URI:'/catalog'
Location:   '/catalog'
Directory:  None
Filename:   'C:/Program Files/Apache Software Foundation/Apache2.2/
htdocs/catalog'
PathInfo:   ''

Phase:  'PythonHandler'
Handler:'django.core.handlers.modpython'

Traceback (most recent call last):

  File "C:\Python25\Lib\site-packages\mod_python\importer.py", line
1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)

  File "C:\Python25\Lib\site-packages\mod_python\importer.py", line
1229, in _process_target
result = _execute_target(config, req, object, arg)

  File "C:\Python25\Lib\site-packages\mod_python\importer.py", line
1128, in _execute_target
result = object(arg)

  File "C:\Python25\Lib\site-packages\django\core\handlers
\modpython.py", line 178, in handler
return ModPythonHandler()(req)

  File "C:\Python25\Lib\site-packages\django\core\handlers
\modpython.py", line 146, in __call__
self.load_middleware()

  File "C:\Python25\Lib\site-packages\django\core\handlers\base.py",
line 29, in load_middleware
mod = __import__(mw_module, {}, {}, [''])

  File "C:\Python25\Lib\site-packages\django\contrib\sessions
\middleware.py", line 2, in 
from django.contrib.sessions.models import Session

  File "C:\Python25\Lib\site-packages\django\contrib\sessions
\models.py", line 3, in 
from django.db import models

  File "C:\Python25\Lib\site-packages\django\db\__init__.py", line 11,
in 
backend = __import__('django.db.backends.%s.base' %
settings.DATABASE_ENGINE, {}, {}, [''])

  File "C:\Python25\Lib\site-packages\django\db\backends\postgresql
\base.py", line 13, in 
raise ImproperlyConfigured, "Error loading psycopg module: %s" % e

ImproperlyConfigured: Error loading psycopg module: No module named
psycopg
--~--~-~--~~~---~--~~
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: ImproperlyConfigured: Error importing middleware django.contrib.sessions.middleware: "No module named mysite"

2007-02-02 Thread Graham Dumpleton



On Feb 3, 12:12 am, "HenrikG" <[EMAIL PROTECTED]> wrote:
> My biggest problem was to get the Location directive right in the
> httpd.conf. It now looks like this:
>
> 
>   SetHandlermod_python
>   PythonHandler django.core.handlers.modpython
>   PythonPath "sys.path + ['/usr/local/apache2/django']"
>   SetEnv DJANGO_SETTINGS_MODULE myproject.settings
>   PythonDebug On
>   PythonAutoReload On
> 
>
> OK, maybe that path isn't the smartest, but I'm a Linux noob and I'm
> learning. The "PythonAutoReload On" means thatmod_pythonreloads all
> python modules automatically whenever they change. This is on by
> default, I read somewhere, but I figured it wouldn't hurt.

FYI, the mod_python PythonAutoReload does not cause all modules that
change to be reloaded, it only reloads certain modules. Candidates for
reloading are only those which are referenced directly by the
Python*Handler directives, and generally only those of them which are
in the Apache document tree. When Django is used the directive
basically doesn't do anything as the top level module is the
mod_python handler which isn't going to change. Thus, when using
Django, you may as well just turn PythonAutoReload to Off as it isn't
going to ever do anything or help in anyway when changes are made to
your Django application.

Graham


--~--~-~--~~~---~--~~
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: ImproperlyConfigured: Error importing middleware django.contrib.sessions.middleware: "No module named mysite"

2007-02-01 Thread wub

Henrik,

I've been stuck in a a place like Ron's all morning.  I thought I had
gotten to a later problem when I started getting Django errors
indication that there was 'no module mysite.urls', but I just gave it
another try, and I'm back to the mod-python error 'no module named
mysite'.  I seem to be at a point where I get to choose between the
mod-python and Django errors about non-existence of modules.  At least
I no longer have Apache 'no such place' errors.

Do you know why there is such a lag in response to configuration file
changes?  When I change httpd.conf and restart Apache, it seems to see
new settings fairly quickly, but when I change settings.py, Django
does not "catch up" for quite a while. I tried deleting everything I
could find with a .pyc extension, but that does not seem to help, (and
may be causing some actual harm?)

I have gotten the full tutorial to work (WinXP, Python 2.4.1/mod-
python3.2.8 /Django 0.95) with the development web server, and the
next place to go is Apache (2.0.59, at least for now).  I intend to
move to Linux, but for reasons of practicality I am currently working
in Windows.

Thanks for any light you can shed on this.

John.

On Feb 1, 7:09 am, "HenrikG" <[EMAIL PROTECTED]> wrote:
> Hi Ron!
>
> Try changing
> '/home/rsie/projects/mysite'
> to
> '/home/rsie/projects'
>
> and also change
> SetEnv DJANGO_SETTINGS_MODULE settings
> to
> SetEnv DJANGO_SETTINGS_MODULE mysite.settings
>
> regards,
> /Henrik


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



  1   2   >