1

私はこのエラーがあります:

 **'Meta' object has no attribute 'abstract'**

新しいdjangoアプリをインストールした後に発生し、djangoバージョンを1.5に更新し、1.3に戻しましたが、まだ同じ問題があります!

今、私のプロジェクトはもう機能していません!!

トレースバック:

AttributeError at /
'Meta' object has no attribute 'abstract'
Request Method: GET
Request URL:    http://127.0.0.1:8090/
Django Version: 1.3.1
Exception Type: AttributeError
Exception Value:       
'Meta' object has no attribute 'abstract'
Exception Location:     /usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py in register, line 80
Python Executable:      /home/a/projects/django1.2/bin/python
Python Version: 2.7.1
Python Path:   
['/home/a/projects/c190',
 '/home/a/projects/django1.2/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',
 '/home/a/projects/django1.2/local/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg',
 '/home/a/projects/django1.2/lib/python2.7',
 '/home/a/projects/django1.2/lib/python2.7/plat-linux2',
 '/home/a/projects/django1.2/lib/python2.7/lib-tk',
 '/home/a/projects/django1.2/lib/python2.7/lib-old',
 '/home/a/projects/django1.2/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/home/a/projects/django1.2/local/lib/python2.7/site-packages',
 '/usr/local/lib/python2.7/dist-packages/pip-1.0.2-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages/satchless-2011.9.pre-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages/django_payments-0.1-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages/requests-0.8.9-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages/certifi-0.0.8-py2.7.egg',
 '/usr/local/lib/python2.7/dist-packages',
 '/home/a/projects/src/django-constance',
 '/home/a/workspace/fandjango',
 '/usr/local/lib/python2.7/site-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PIL',
 '/usr/lib/python2.7/dist-packages/gst-0.10',
 '/usr/lib/python2.7/dist-packages/gtk-2.0',
 '/usr/lib/pymodules/python2.7',
 '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
 '/usr/lib/python2.7/dist-packages/ubuntuone-client',
 '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',
 '/usr/lib/python2.7/dist-packages/ubuntuone-couch',
 '/usr/lib/python2.7/dist-packages/ubuntuone-installer',
 '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol',
 '/home/a/projects/c190',
 '/home/a/projects/c190']
Server time:    lun, 4 Nov 2013 17:45:42 +0000



Environment:


Request Method: GET
Request URL: http://127.0.0.1:8090/

Django Version: 1.3.1
Python Version: 2.7.2
Installed Applications:
['django.contrib.auth',
 'django.contrib.comments',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.admin',
 'ckeditor',
 'constance',
 'constance.backends.database',
 'custom_flatpages',
 'disqus',
 'django_extensions',
 'django_mobile',
 'django_xmlrpc',
 'easy_thumbnails',
 'file_uploader',
 'mediatheque',
 'mptt',
 'pagination',
 'ckeditor',
 'south',
 'sentry',
 'indexer',
 'paging',
 'contact',
 'gallerie',
 'news',
 'newsletter',
 'tagging',
 'zinnia',
 'social_sharing',
 'popup',
 'medecin',
 'agenda',
 'pathologie',
 'contentadmin',
 'haystack']
Installed Middleware:
('annoying.middlewares.StaticServe',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'pagination.middleware.PaginationMiddleware')


Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
  101.                             request.path_info)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in resolve
  250.             for pattern in self.url_patterns:
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in _get_url_patterns
  279.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in _get_urlconf_module
  274.             self._urlconf_module = import_module(self.urlconf_name)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)
File "/home/a/projects/c190_pratique/pratique/../pratique/urls.py" in <module>
  7. admin.autodiscover()
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/__init__.py" in autodiscover
  26.             import_module('%s.admin' % app)
File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)
File "/home/a/projects/src/django-constance/constance/admin.py" in <module>
  124. admin.site.register([Config], ConstanceAdmin)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py" in register
  80.             if model._meta.abstract:

Exception Type: AttributeError at /
Exception Value: 'Meta' object has no attribute 'abstract'

詳細はこちら: http: //pastebin.com/wcMtCEsb

4

1 に答える 1

0

問題を解決するには、django 1.2に戻す必要があったようです

于 2013-12-04T14:18:28.663 に答える