PW0131 / django-crm

Automatically exported from code.google.com/p/django-crm
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

FieldError at /crm/interaction/ #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
After creating a Person, a Business and an Interaction for the person, 
clicking 'All Interactions' on the Dashboard I got the following:

FieldError at /crm/interaction/
Cannot resolve keyword 'project' into field. Choices are: cdr_id, completed, 
contacts, date, id, memo, type
Request Method: GET
Request URL:    http://127.0.0.1:8001/crm/interaction/
Exception Type: FieldError
Exception Value:    
Cannot resolve keyword 'project' into field. Choices are: cdr_id, completed, 
contacts, date, id, memo, type
Exception Location: 
/usr/lib/pymodules/python2.6/django/db/models/sql/query.py in setup_joins, 
line 1737

Traceback:
File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py" in 
get_response
  92.                 response = callback(request, *callback_args, 
**callback_kwargs)
File "/usr/lib/pymodules/python2.6/django/contrib/auth/decorators.py" in 
__call__
  78.             return self.view_func(request, *args, **kwargs)
File 
"/home/setas/dev/tests/crm/sample_project/external/crm/crm/decorators.py" in 
wrapper
  21.             response = view_func(*args, **kwargs)
File "/home/setas/dev/tests/crm/sample_project/external/crm/crm/views.py" in 
list_interactions
  383.             Q(memo__icontains=search)
File "/usr/lib/pymodules/python2.6/django/db/models/manager.py" in filter
  129.         return self.get_query_set().filter(*args, **kwargs)
File "/usr/lib/pymodules/python2.6/django/db/models/query.py" in filter
  498.         return self._filter_or_exclude(False, *args, **kwargs)
File "/usr/lib/pymodules/python2.6/django/db/models/query.py" in 
_filter_or_exclude
  516.             clone.query.add_q(Q(*args, **kwargs))
File "/usr/lib/pymodules/python2.6/django/db/models/sql/query.py" in add_q
  1671.                     self.add_q(child, used_aliases)
File "/usr/lib/pymodules/python2.6/django/db/models/sql/query.py" in add_q
  1675.                             can_reuse=used_aliases)
File "/usr/lib/pymodules/python2.6/django/db/models/sql/query.py" in 
add_filter
  1569.                     negate=negate, process_extras=process_extras)
File "/usr/lib/pymodules/python2.6/django/db/models/sql/query.py" in 
setup_joins
  1737.                             "Choices are: %s" % (name, ", 
".join(names)))

Exception Type: FieldError at /crm/interaction/
Exception Value: Cannot resolve keyword 'project' into field. Choices are: 
cdr_id, completed, contacts, date, id, memo, type

Original issue reported on code.google.com by set...@gmail.com on 25 Jan 2010 at 6:43

GoogleCodeExporter commented 8 years ago
I have an trouble too.

Environment:

Request Method: GET
Request URL: http://localhost:8001/crm/interaction/
Django Version: 1.1.1
Python Version: 2.6.4
Installed Applications:
['django.contrib.auth',
 'django.contrib.admin',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.humanize',
 'django.contrib.markup',
 'contactinfo',
 'countries',
 'crm',
 'crumbs',
 'django_notify',
 'pagination',
 'deps']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django_notify.middleware.NotificationsMiddleware',
 'crm.middleware.StandardViewKwargsMiddleware',
 'pagination.middleware.PaginationMiddleware')

Traceback:
File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/django/core/handlers/base.py" in get_response
  92.                 response = callback(request, *callback_args, **callback_kwargs)
File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/django/contrib/auth/decorators.py" in __call__
  78.             return self.view_func(request, *args, **kwargs)
File 
"/Users/key/.virtualenvs/crmtest/sample_project/external_apps/crm/decorators.py"
 in wrapper
  21.             response = view_func(*args, **kwargs)
File 
"/Users/key/.virtualenvs/crmtest/sample_project/external_apps/crm/views.py" in 
list_interactions
  383.             Q(memo__icontains=search)
File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/django/db/models/manager.py" in filter
  129.         return self.get_query_set().filter(*args, **kwargs)
File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/django/db/models/query.py" in filter
  498.         return self._filter_or_exclude(False, *args, **kwargs)
File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/django/db/models/query.py" in _filter_or_exclude
  516.             clone.query.add_q(Q(*args, **kwargs))
File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/django/db/models/sql/query.py" in add_q
  1671.                     self.add_q(child, used_aliases)
File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/django/db/models/sql/query.py" in add_q
  1675.                             can_reuse=used_aliases)
File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/django/db/models/sql/query.py" in add_filter
  1569.                     negate=negate, process_extras=process_extras)
File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/django/db/models/sql/query.py" in setup_joins
  1737.                             "Choices are: %s" % (name, ", ".join(names)))

Exception Type: FieldError at /crm/interaction/
Exception Value: Cannot resolve keyword 'project' into field. Choices are: 
cdr_id, completed, contacts, date, id, 
memo, type

Original comment by mitsukun...@gmail.com on 1 Apr 2010 at 4:31

GoogleCodeExporter commented 8 years ago
Has anyone an idea how to fix this ? 

Original comment by Norbert....@gmail.com on 26 Oct 2010 at 6:37

GoogleCodeExporter commented 8 years ago
I have the same problem (

FieldError at /crm/interaction/

Cannot resolve keyword 'project' into field. Choices are: cdr_id, completed, 
contacts, date, id, memo, type

Request Method:     GET
Request URL:    http://127.0.0.1:8000/crm/interaction/
Django Version:     1.3 beta 1
Exception Type:     FieldError
Exception Value:    

Cannot resolve keyword 'project' into field. Choices are: cdr_id, completed, 
contacts, date, id, memo, type

Exception Location: 
    c:\Python27\lib\site-packages\django\db\models\sql\query.py in setup_joins, 
line 1236
Python Executable:  c:\Python27\python.exe
Python Version:     2.7.0
Python Path:    

['C:\\dproject\\sample_project\\external_apps',
 'C:\\dproject\\sample_project',
 'c:\\Python27\\lib\\site-packages\\textile-2.1.4-py2.7.egg',
 'C:\\WINDOWS\\system32\\python27.zip',
 'c:\\Python27\\DLLs',
 'c:\\Python27\\lib',
 'c:\\Python27\\lib\\plat-win',
 'c:\\Python27\\lib\\lib-tk',
 'c:\\Python27',
 'c:\\Python27\\lib\\site-packages',
 'c:\\Python27\\lib\\site-packages\\PIL',
 'c:\\Python27\\lib\\site-packages\\win32',
 'c:\\Python27\\lib\\site-packages\\win32\\lib',
 'c:\\Python27\\lib\\site-packages\\Pythonwin']

Server time:    Fri, 28 Jan 2011 17:18:26 +0300

Original comment by lex...@gmail.com on 28 Jan 2011 at 2:29

GoogleCodeExporter commented 8 years ago
interactions = crm.Interaction.objects.filter(
            Q(type__icontains=search) |
            Q(project__name__icontains=search) |
            Q(contacts__first_name__icontains=search) |
            Q(contacts__last_name__icontains=search) |
            Q(memo__icontains=search)
in crm/view.py 381 remove Q(project__name__icontains=search) |

Original comment by Cpengxi...@gmail.com on 2 Mar 2011 at 1:48