Re: Admin search error (using auto complete FK widget)

2009-08-28 Thread mr.kschan

Hi,

There is solution to use Jannis's widget with Django 1.1.

Please read the blog post's comment by Christian Abbott June 24, 2009.

The __call__ is deprecated in Django1.1 and you could better update
the code to use get_urls() instead. =]

I just tried and it works ^^

ks

On Aug 28, 12:01 pm, "mr.kschan" <mr.ksc...@gmail.com> wrote:
> Hi,
>
> On Aug 26, 9:34 pm, maco <marko.dvor...@gmail.com> wrote:
>
>
>
> > Jannis Liedel writes about a great widget for FK 
> > fieldshttp://jannisleidel.com/2008/11/autocomplete-form-widget-foreignkey-m...
>
> > I manged to get it to work on one site, but not on others.
>
> > Widget uses admin search functionality through url:
> > /admin/app/model/search/?
> > q=foo_fields=my_field_label=my_app_name=my_model
>
> > However, on some sites using same code and on the same server (running
> > django 1.1 and python 2.5) I get error:
>
> > invalid literal for int() with base 10: 'search'
> > Exception Location: /Library/Python/2.5/site-packages/django/db/models/
> > fields/__init__.py in get_db_prep_value, line 361
> > Python Executable: /System/Library/Frameworks/Python.framework/
> > Versions/2.5/Resources/Python.app/Contents/MacOS/Python
> > Python Version: 2.5.1
>
> I was facing the same problem. Django 1.1 with py26
>
> But I think if u try fallback to Django 1.0.2 or 1.0.3 , the problem
> will not exist.
>
> > I tried several different aps, models and fields and got same result.
> > I googled about the error and all could get was that django can't
> > search on date fields that have None as default value, but that is not
> > the case for me here.
>
> I don't think that's related to any field but u may refer to the
> ticket #11678http://code.djangoproject.com/ticket/11678
>
> kschan.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Admin search error (using auto complete FK widget)

2009-08-28 Thread mr.kschan

Hi,

On Aug 26, 9:34 pm, maco  wrote:
> Jannis Liedel writes about a great widget for FK 
> fieldshttp://jannisleidel.com/2008/11/autocomplete-form-widget-foreignkey-m...
>
> I manged to get it to work on one site, but not on others.
>
> Widget uses admin search functionality through url:
> /admin/app/model/search/?
> q=foo_fields=my_field_label=my_app_name=my_model
>
> However, on some sites using same code and on the same server (running
> django 1.1 and python 2.5) I get error:
>
> invalid literal for int() with base 10: 'search'
> Exception Location: /Library/Python/2.5/site-packages/django/db/models/
> fields/__init__.py in get_db_prep_value, line 361
> Python Executable: /System/Library/Frameworks/Python.framework/
> Versions/2.5/Resources/Python.app/Contents/MacOS/Python
> Python Version: 2.5.1
>

I was facing the same problem. Django 1.1 with py26

But I think if u try fallback to Django 1.0.2 or 1.0.3 , the problem
will not exist.

> I tried several different aps, models and fields and got same result.
> I googled about the error and all could get was that django can't
> search on date fields that have None as default value, but that is not
> the case for me here.

I don't think that's related to any field but u may refer to the
ticket #11678 http://code.djangoproject.com/ticket/11678


kschan.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---