Bug 1098335

Summary: django project wrongly configured
Product: [Fedora] Fedora Reporter: Honza Horak <hhorak>
Component: devassistantAssignee: Tomas 'Sheldon' Radej <tradej>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: bkabrda, phracek, tradej
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-02 09:40:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Honza Horak 2014-05-15 20:54:04 UTC
Description of problem:
After creating django project without any other tools configured, this is the error I get when trying to start the server:

$ ./manage.py runserver
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.7/site-packages/django/core/management/base.py", line 280, in execute
    translation.activate('en-us')
  File "/usr/lib/python2.7/site-packages/django/utils/translation/__init__.py", line 130, in activate
    return _trans.activate(language)
  File "/usr/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 188, in activate
    _active.value = translation(language)
  File "/usr/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 177, in translation
    default_translation = _fetch(settings.LANGUAGE_CODE)
  File "/usr/lib/python2.7/site-packages/django/utils/translation/trans_real.py", line 159, in _fetch
    app = import_module(appname)
  File "/usr/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/usr/lib/python2.7/site-packages/django/contrib/admin/__init__.py", line 6, in <module>
    from django.contrib.admin.sites import AdminSite, site
  File "/usr/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 4, in <module>
    from django.contrib.admin.forms import AdminAuthenticationForm
  File "/usr/lib/python2.7/site-packages/django/contrib/admin/forms.py", line 6, in <module>
    from django.contrib.auth.forms import AuthenticationForm
  File "/usr/lib/python2.7/site-packages/django/contrib/auth/forms.py", line 17, in <module>
    from django.contrib.auth.models import User
  File "/usr/lib/python2.7/site-packages/django/contrib/auth/models.py", line 48, in <module>
    class Permission(models.Model):
  File "/usr/lib/python2.7/site-packages/django/db/models/base.py", line 96, in __new__
    new_class.add_to_class('_meta', Options(meta, **kwargs))
  File "/usr/lib/python2.7/site-packages/django/db/models/base.py", line 264, in add_to_class
    value.contribute_to_class(cls, name)
  File "/usr/lib/python2.7/site-packages/django/db/models/options.py", line 124, in contribute_to_class
    self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
  File "/usr/lib/python2.7/site-packages/django/db/__init__.py", line 34, in __getattr__
    return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/usr/lib/python2.7/site-packages/django/db/utils.py", line 198, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "/usr/lib/python2.7/site-packages/django/db/utils.py", line 131, in load_backend
    raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: 'django.db.backends.sqlite3sqlite3' isn't an available database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
    u'mysql', u'oracle', u'postgresql_psycopg2', u'sqlite3'
Error was: No module named sqlite3sqlite3.base


Version-Release number of selected component (if applicable):
python-2.7.5-11.fc20.x86_64
python-django-1.6.3-1.fc20.noarch
devassistant-0.8.0-3.fc20.noarch


How reproducible:
tryed just once

Steps to Reproduce:
1. create django project using GUI
2. ./manage.py runserver

Actual results:
python traceback

Expected results:
server starts

Additional info:
Obviously, changing line 64 of startproject/settings.py from
'ENGINE': 'django.db.backends.sqlite3sqlite3
to
'ENGINE': 'django.db.backends.sqlite3
fixes the issue.

Comment 1 Bohuslav "Slavek" Kabrda 2014-05-16 07:05:46 UTC
Hmm, this is caused by django being updated from 1.5.x to 1.6.x; our assistant is working ok with 1.5.x, but 1.6.x creates different settings.py. I can fix this, but the primary problem is in doing a disruptive django update in stable release - this shouldn't have happened in the first place...
Thanks for the report, I'll see that it gets fixed.

Comment 2 Tomas 'Sheldon' Radej 2014-05-21 14:40:07 UTC
I'll fix this.

Comment 3 Fedora Update System 2014-05-22 13:25:26 UTC
devassistant-0.8.0-4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/devassistant-0.8.0-4.fc20

Comment 4 Fedora Update System 2014-05-23 18:58:01 UTC
Package devassistant-0.8.0-4.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing devassistant-0.8.0-4.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-6623/devassistant-0.8.0-4.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-06-23 16:16:24 UTC
devassistant-0.9.1-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/devassistant-0.9.1-1.fc20

Comment 6 Fedora Update System 2014-07-01 23:28:32 UTC
devassistant-0.9.1-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Tomas 'Sheldon' Radej 2014-07-02 09:40:19 UTC
A new version with totally reworked django assistant landed in F20, so I am closing this as fixed.