Django Queryset with filtering on reverse foreign key failing

2014-07-24 Thread Anthony Hawkes
Hi All, I'm currently using a MSSQL DB to access some data and am using django's inspectdb results. I've had to tweak some of the model but so far things have been smooth sailing. Today I needed to run a lookup that spanned through some tables forward and reverse and tested the following in

Django case, when, then on querysets

2014-05-12 Thread Anthony Hawkes
Hi Guys, I need to replace results in a queryset and then perform counts and further queries on the set and have been trying to find a way of doing it. Basically in some but not all cases I get a set of results eg select * from table and then I want to do a: case when column = 'some value'

Re: Making functions callable

2014-03-26 Thread Anthony Hawkes
Thanks Guys, especially Javier! I've spent so much time trawling Google for this info! On Thursday, 27 March 2014 04:57:30 UTC+8, Anthony Hawkes wrote: > > Hi Guys, > > I'm running into a problem with django(I guess this would also affect > Python in general) where if I create

Making functions callable

2014-03-26 Thread Anthony Hawkes
Hi Guys, I'm running into a problem with django(I guess this would also affect Python in general) where if I create a view eg def view(year=today.year()) The year is never re-evaluated until the server is reloaded/restarted I'm trying to figure out how to make a callable method accessible as a

Oracle 'invalid identifier' and SQL select structure

2014-01-15 Thread Anthony Hawkes
I'm having trouble with django 1.6 running queries on a table I need to pull data from When I run the following from shell CRMData.objects.filter(Incident_Date='2014-01-14') I get: DatabaseError: ORA-00904: "ODBC_EXTRACT_DAILY"."INCIDENT_DATE": invalid identifier I've run queries in sqlplus