Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

django_sqlalchemy missing DJANGO_SQLALCHEMY_DBURI causes dump #13

Open
GoogleCodeExporter opened this issue Nov 3, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

If the user specifies:
{{{
from django_sqlalchemy import models
}}}

but does not set the a DJANGO_SQLALCHEMY_DBURI settings in the settings.py 
module the 
following dump occurs. Look into provided a cleaner message that indicates the 
problem:

{{
mtrier@michael-triers-computer:~/Development/django-sqlalchemy/original$ 
./manage.py 
syncdb
Traceback (most recent call last):
  File "./manage.py", line 11, in <module>
    execute_manager(settings)
  File "/Library/Python/2.5/site-packages/django/core/management/__init__.py", line 272, in 
execute_manager
    utility.execute()
  File "/Library/Python/2.5/site-packages/django/core/management/__init__.py", line 219, in 
execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Library/Python/2.5/site-packages/django/core/management/base.py", line 72, in 
run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Library/Python/2.5/site-packages/django/core/management/base.py", line 85, in 
execute
    self.validate()
  File "/Library/Python/2.5/site-packages/django/core/management/base.py", line 112, in 
validate
    num_errors = get_validation_errors(s, app)
  File "/Library/Python/2.5/site-packages/django/core/management/validation.py", line 28, in 
get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/Library/Python/2.5/site-packages/django/db/models/loading.py", line 126, in 
get_app_errors
    self._populate()
  File "/Library/Python/2.5/site-packages/django/db/models/loading.py", line 55, in _populate
    self.load_app(app_name, True)
  File "/Library/Python/2.5/site-packages/django/db/models/loading.py", line 70, in load_app
    mod = __import__(app_name, {}, {}, ['models'])
  File "/Users/mtrier/Development/django-sqlalchemy/original/../original/bar/models.py", line 
2, in <module>
    from django_sqlalchemy import models
  File "/Users/mtrier/Development/django-sqlalchemy/django_sqlalchemy/models/__init__.py", 
line 5, in <module>
    from django_sqlalchemy.models.fields.related import ForeignKey, ManyToManyField
  File "/Library/Python/2.5/site-packages/django_sqlalchemy/models/fields/related.py", line 2, 
in <module>
    from django_sqlalchemy.backend import metadata, Session
  File "/Users/mtrier/Development/django-sqlalchemy/django_sqlalchemy/backend/__init__.py", 
line 2, in <module>
    from base import engine, Session, metadata
  File "/Users/mtrier/Development/django-sqlalchemy/django_sqlalchemy/backend/base.py", 
line 19, in <module>
    engine = create_engine(settings.DJANGO_SQLALCHEMY_DBURI, convert_unicode=True)
  File "/Library/Python/2.5/site-packages/django/conf/__init__.py", line 32, in __getattr__
    return getattr(self._target, name)
AttributeError: 'Settings' object has no attribute 'DJANGO_SQLALCHEMY_DBURI'
}}

Original issue reported on code.google.com by mtr...@gmail.com on 5 Apr 2008 at 10:08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant