Okay so here is my code:
******This way works and does not error******
rs = BadActor.objects.filter(addr__iregex='^(192\.188\.)(.*)(\.20)$');
print len(rs);
print rs[0].addr
*******This way errors********
q = Q({'addr__iregex':'^(192\.188\.)(.*)(\.20)$'});
rs = BadActor.objects.filter(q);
print len(rs);
print rs[0].addr
******THE ERROR MESSAGE*****
Request Method: GET
Request URL: http://127.0.0.1:8000/federated/repo/search/alerts/
Exception Type: ValueError
Exception Value:
need more than 1 value to unpack
Exception Location: /usr/lib/python2.5/site-packages/django/db/models/
sql/query.py in add_filter, line 1155
Python Executable: /usr/bin/python
Python Version: 2.5.4
****END Error********
So what am i doing wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---