Opened 11 years ago

Last modified 11 years ago

#22466 closed Bug

'ManyToOneRel' object has no attribute 'rel' — at Initial Version

Reported by: Takis Issaris Owned by: nobody
Component: Database layer (models, ORM) Version: 1.7-beta-2
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I just installed Django 1.7b1 in my development virtualenv where I normally use Django 1.6.1. After fixing several expected things (mimetype, ugettext), I got an error which I could not find a reference to in the release notes:
AttributeError at /orders/price/ 'ManyToOneRel' object has no attribute 'rel'

Request Method: POST
Request URL: http://192.168.3.200:8001/orders/price/
Django Version: 1.7b1
Python Executable: /home/ic/adk/dj/bin/python
Python Version: 2.7.3

Python Path: ['/home/ic/adk/dj/adkwoningdev', '/home/ic/adk/dj/lib/python2.7/site-packages/adkw_calctable-0.1-py2.7.egg', '/home/ic/adk/dj/lib/python2.7/site-packages/adkw_portsectionheights-0.1-py2.7.egg', '/home/ic/adk/dj/lib/python27.zip', '/home/ic/adk/dj/lib/python2.7', '/home/ic/adk/dj/lib/python2.7/plat-linux2', '/home/ic/adk/dj/lib/python2.7/lib-tk', '/home/ic/adk/dj/lib/python2.7/lib-old', '/home/ic/adk/dj/lib/python2.7/lib-dynload', '/opt/python-2.7.3/lib/python2.7', '/opt/python-2.7.3/lib/python2.7/plat-linux2', '/opt/python-2.7.3/lib/python2.7/lib-tk', '/home/ic/adk/dj/lib/python2.7/site-packages', '/home/ic/adk/dj/lib/python2.7/site-packages/PIL']

Server time: Thu, 17 Apr 2014 12:10:24 +0200

Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'django.contrib.admindocs', 'south', 'orders', 'siunits', 'portsections', 'springcalc', 'ral', 'printer', 'springorders', 'glassorders', 'suppliers', 'scanner', 'statistics', 'django_extensions', 'panels', 'tracks', 'drive', 'person', 'discounts', 'production', 'productionplanning', 'nonstdports', 'unstructuredorders', 'adkapp5', 'loading', 'paints', 'deliverynote', 'mail', 'download', 'experiments')

Installed Middleware: ('django.middleware.gzip.GZipMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'mymid.CustomMiddleware')

Traceback: File "/home/ic/adk/dj/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 113. response = wrapped_callback(request, *callback_args, callback_kwargs) File "/home/ic/adk/dj/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view 22. return view_func(request, *args, kwargs) File "/home/ic/adk/dj/adkwoningdev/orders/views.py" in price 161. price = order.get_price_estimate() File "/home/ic/adk/dj/adkwoningdev/orders/models.py" in get_price_estimate 1473. return self.count * self.process_order_items(self.price_item_discount) File "/home/ic/adk/dj/adkwoningdev/orders/models.py" in process_order_items 1198. price, panel = self.calculate_panelprice() File "/home/ic/adk/dj/adkwoningdev/orders/models.py" in calculate_panelprice 1570. if len(panels) > 0: File "/home/ic/adk/dj/lib/python2.7/site-packages/django/db/models/query.py" in len 122. self._fetch_all() File "/home/ic/adk/dj/lib/python2.7/site-packages/django/db/models/query.py" in _fetch_all 961. self._result_cache = list(self.iterator()) File "/home/ic/adk/dj/lib/python2.7/site-packages/django/db/models/query.py" in iterator 265. for row in compiler.results_iter(): File "/home/ic/adk/dj/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in results_iter 694. for rows in self.execute_sql(MULTI): File "/home/ic/adk/dj/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql 769. sql, params = self.as_sql() File "/home/ic/adk/dj/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in as_sql 100. ordering, o_params, ordering_group_by = self.get_ordering() File "/home/ic/adk/dj/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in get_ordering 424. self.query.get_meta(), default_order=asc): File "/home/ic/adk/dj/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in find_ordering_name 464. if field.rel and path and opts.ordering: Exception Type: AttributeError at /orders/price/ Exception Value: 'ManyToOneRel' object has no attribute 'rel'

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top