thnx, yea that's what I'm looking for. unfortunately I cannot use 1.7 ;(
On 19.02.2014 23:19, Anssi Kääriäinen wrote:
> If I am not mistaken you are trying to alter how
> .filter(customfield__eq=val) and friends work.
>
> In current Django versions you can't easily customize the SQL generated
> for ORM lookups. In Django 1.7 (currently in alpha) this is possible
> using custom lookups. Custom lookups will allow you to alter the SQL
> generated for different lookups (and also add new lookups if need be).
> See
https://docs.djangoproject.com/en/dev/ref/models/custom-lookups/ for
> all the details.
>
> - Anssi
>
> On Wednesday, February 19, 2014 1:45:43 PM UTC+2, johannes.schneider wrote:
>
> hey list,
>
> I have a custom Field implemented for one of my models. How do I
> implement the database operations (e.g. '==', '!=') for the custom
> field
> which are used to execute database queries?
>
> bg,
> Johannes
> --
> Johannes Schneider
> Webentwicklung
> Tel.:
+49.228.42150.xxx
>
> Galileo Press GmbH
> Rheinwerkallee 4 - 53227 Bonn - Germany
> Tel.: +49.228.42.150.0 (Zentrale) .77 (Fax)
>
http://www.galileo-press.de/
>
> Geschäftsführer: Tomas Wehren, Ralf Kaulisch, Rainer Kaltenecker
> HRB 8363 Amtsgericht Bonn
>