Re: Subquery filter (__in) causing invalid SQL

2017-05-12 Thread Murray Christopherson
I am assuming you are a regular to the Django community - possibly even a moderator? Despite the workaround (thanks again), would you recommend I add this to the issue tracker as a bug? On Friday, 12 May 2017 13:25:55 UTC-4, Simon Charette wrote: > > Hi Murray, > > That looks like

Re: Subquery filter (__in) causing invalid SQL

2017-05-12 Thread Murray Christopherson
Unfortunately, my checks come up fruitless. Simon's code seems to work in both 1.10 and 1.11. I would have swore I tried this code during my attempts, but I will trust that I am mistaken, and thank you Simon for pointing me in the right direction. On Friday, 12 May 2017 13:39:37 UTC-4, M

Re: Subquery filter (__in) causing invalid SQL

2017-05-12 Thread Murray Christopherson
v1.11 and the new Subquery type, so I assumed it must be the new "correct" way. I will update this thread with my findings. On Friday, 12 May 2017 13:25:55 UTC-4, Simon Charette wrote: > > Hi Murray, > > That looks like a bug to me. > > Do you get similar results if

Subquery filter (__in) causing invalid SQL

2017-05-12 Thread Murray Christopherson
Not sure if I should raise this as a bug, because I'm not sure if I'm using it correctly. I am writing code conceptually similar to the code I am actually working with, I hope it suffices. Within my app, there is the concept of permits and suspensions: class Permit(models.Model): class Meta:

NameError: name 's' is not defined

2016-02-02 Thread Murray Baker
*```* *Murrays-MacBook-Pro:mysite MurrayBaker89$ python manage.py sqlmigrate polls 0001* *Traceback (most recent call last):* * File "manage.py", line 10, in * *execute_from_command_line(sys.argv)* * File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/

Re: Debugging Unit Tests

2010-11-23 Thread Murray
. How are you running your tests -- are you just > using the standard test runner? > > On Nov 22, 2010, at 9:04, Murray wrote: > > > > > > > > > pdb dosn't seem to work inside my unit tests,  whenever I run > > set_trace the unit test running free

Debugging Unit Tests

2010-11-22 Thread Murray
iling tests? Thanks, Murray -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. F

django extensions dumpscript, No module found

2010-11-22 Thread Murray
scripts/__init__.py > ./manage.py runscript scripts/test.py No module for script 'scripts/data.py' found Thanks, Murray -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@google

Re: django_content_type integrity error on sync and loaddata

2010-11-22 Thread Murray
Thanks, that's solved it. On Nov 19, 6:36 pm, Shawn Milochik wrote: > When you run dumpdata you can specify apps or models within an app to > export. That will allow you to avoid bringing Django's scaffolding > into your fixtures. > > Shawn -- You received this message because you are subscribe

django_content_type integrity error on sync and loaddata

2010-11-19 Thread Murray
table after running syncdb. But I don't want to do this every time I set up a test database. What am I doing wrong here? Is there someway to create the fixture so that it dosn't try to repopulate the django_content_type table? Thanks, Murray -- You received this message because yo

__str__ referencing variables in other classes

2007-04-20 Thread Jason Murray
This may seem like a pretty basic question, but I can't seem to figure it out. Is it possible to have a class's __str__ function access variables from other classes in a model? For example: class Person(models.Model): first_name = models.CharField(maxlength=30) last_name = models.Ch

One project, multiple apps, all using their own DB

2006-09-15 Thread Jason Murray
I'm a django newbie (still working on the first app). I'm trying to figure out how to do something, only conceptually at this point. So I have no errors to send. I host a few apps on my home machine. They each use their own DB (on the same server). I'm thinking I should set up a project for the w

Re: Problems with __str__ methods in my Models

2006-07-14 Thread Jason Murray
Thanks Adrian. I actually figured this out when I was coming into work today. Sometimes I fire of a "help!" to the list a bit too fast. I'm just getting started with django, my confidence will increase with time. Adrian Holovaty wrote: > On 7/13/06, Jason Murray <[EM

Problems with __str__ methods in my Models

2006-07-13 Thread Jason Murray
Yes it's me again :) Anyway I've populating my Models with __str_ methods. I've only had on hicough. Here is the model in question: class Result(models.Model): ID = models.IntegerField(primary_key=True) home_runs = models.IntegerField("home team runs", null=True, blank=True) away

SQL Queries with columns not in the DB

2006-07-13 Thread Jason Murray
ts. I don't think the writing custom SQL with connection.cursor() is the way to go. I know that the join portions of the where clauses will be taken care of by the db_api. I also know that I can do ORDER BY and LIMIT type stuff with extra=, .order(), etc. Am I on the right path? -- | Jason Murray

Extending the SQL

2006-07-12 Thread Jason Murray
Another question for you all. As soon as I get my model.py ironed out for my existing DB I'm going to starting using the python db interface to see if things look good. Which means of course that I'll want to duplicate some of the queries that the existing app does. The site maintains the res

inspectdb

2006-07-12 Thread Jason Murray
I have an existing cgi based app that I'm starting to move over to django. I'm looking forward to seeing just what django can do for me. Since the DB has quite a bit of data and I'd like to avoid recreating the DB model in django and moving the actual data, I've elected to use the ispectdb fea