magic-removal: where_constraints

0 views
Skip to first unread message

Ian Holsman

unread,
Feb 14, 2006, 4:36:14 AM2/14/06
to django-d...@googlegroups.com
hi.
I decided to take the plunge and start moving some of my stuff over.

my first stumbling block I have found is that I was using
'where_constraints' to automatically set the SITE_ID.

how does one do this in magic_removal?

regards
Ian

--
I...@Holsman.net -- blog: http://feh.holsman.net/ -- PH: ++61-3-9877-0909

If everything seems under control, you're not going fast enough. -
Mario Andretti

Andreas Stuhlmüller

unread,
Feb 14, 2006, 5:42:20 AM2/14/06
to django-d...@googlegroups.com
On 2/14/06, Ian Holsman <kry...@gmail.com> wrote:
> my first stumbling block I have found is that I was using
> 'where_constraints' to automatically set the SITE_ID.
>
> how does one do this in magic_removal?

I replaced the where_constraints by overwriting the default query
sets. See http://code.djangoproject.com/wiki/RemovingTheMagic#YoucanoverridedefaultQuerySets.
Using python parameters instead of SQL is a nice improvement over the
where_constraints method.

Andreas

Reply all
Reply to author
Forward
0 new messages