Re: Filtering only on Annotations

2010-01-19 Thread Russell Keith-Magee
On Wed, Jan 20, 2010 at 3:42 AM, Collin Anderson wrote: > Taking the example from: > http://docs.djangoproject.com/en/dev/topics/db/aggregation/#filter-and-exclude > > Publisher.objects.filter(book__rating__gt=3.0).annotate(num_books=Count > ('book')) > > Is there anyway to have the filter only ap

Re: Followup on the Montréal Sprint

2010-01-20 Thread Russell Keith-Magee
On Tue, Jan 19, 2010 at 10:59 PM, Yannick Gingras wrote: > > Greetings, >  The django translation sprint was a clear success.  A team of eight > sprinters worked on the Django documentation and after an intense > training session on the toolchain, we were able complete a sizable > part of the API

Re: Django and caching when data is updated

2010-01-20 Thread Russell Keith-Magee
On Thu, Jan 21, 2010 at 7:47 AM, Malcolm Box wrote: > Hi, > > On the quest for performance I'm now having a look at Django's caching > framework. > > I've got a simple question that I can't find the answer to:  if the data > that a view depends on changes, does Django do anything smart to invalida

Re: Django and caching when data is updated

2010-01-21 Thread Russell Keith-Magee
On Thu, Jan 21, 2010 at 6:00 PM, Malcolm Box wrote: > Hi, > > On Thu, Jan 21, 2010 at 7:35 AM, Russell Keith-Magee > wrote: >> >> On Thu, Jan 21, 2010 at 7:47 AM, Malcolm Box >> wrote: >> > >> > I've got a simple question that I can't fi

Re: Converting Django testclient code to run as black-box tests

2010-01-23 Thread Russell Keith-Magee
On Sat, Jan 23, 2010 at 6:40 PM, Malcolm Box wrote: > Hi, > > I've got an existing unit test suite using the django.test.TestCase class > that exercises the HTTP interface of the site, but running under Django's > test harness. > > I'd like to turn this into a black-box test suite, using real HTTP

Re: cache large files

2010-01-24 Thread Russell Keith-Magee
On Mon, Jan 25, 2010 at 1:27 AM, Henrik Genssen wrote: > Hi, > > I am using memcached for caching my sites. The documentation says when > not to use it: > http://code.google.com/p/memcached/wiki/WhyNotMemcached > > one point is output larger 1 MB Ok - please stop. This is the third time you have

Re: what is this error.

2010-01-24 Thread Russell Keith-Magee
On Sat, Jan 23, 2010 at 7:54 PM, Atamert Ölçgen wrote: > On Saturday 23 January 2010 13:24:44 chiranjeevi.muttoju wrote: >> please reply if anybody know what it is.. >> >> thank you.. >> > It would be helpful if you send the code for the models you are trying to > syncdb. Indeed it would. The cod

Re: How can I add PG8000 datbase backend?

2010-01-26 Thread Russell Keith-Magee
On Wed, Jan 27, 2010 at 10:35 AM, Kevin Ar18 wrote: > The documentation says: > "You can use a database backend that doesn't ship with Django by setting > DATABASE_ENGINE to a fully-qualified path (i.e. > mypackage.backends.whatever)." > > So, I installed PG8000.  It is an egg inside of "Python\Li

Re: "Pro Django" book still up to date

2010-01-27 Thread Russell Keith-Magee
On Thu, Jan 28, 2010 at 6:23 AM, FxFocus wrote: > On Jan 27, 4:55 pm, Achim Domma wrote: >> Hi, >> >> I'm interested in buying the "Pro Django" book. I could not find any >> hint about what version it's written for. As it covers mostly >> internals and the ideas behind Django, it should not be ou

Re: "Pro Django" book still up to date

2010-01-27 Thread Russell Keith-Magee
On Thu, Jan 28, 2010 at 1:07 AM, thanos wrote: > It's useless. The "The definitive guide to Django" by Holovaty and > Kaplan-moss is okay, but the Pro version is really just a waste of > paper and time. Everyone is entitled to an opinion, but I must say my opinion is the exact opposite. Yes, Pro

Re: 1.2 alpha, multiple databases, and raw SQL

2010-01-27 Thread Russell Keith-Magee
On Thu, Jan 28, 2010 at 10:41 AM, Chris Curvey wrote: > Is there a way to use raw SQL with multiple databases?  I thought it > might be something like: > > from django.db import connection > cursor = connection.cursor(using="mydb") > > but that complains about an unexpected keyword arg. It is pos

Re: Database performance during test execution

2010-01-29 Thread Russell Keith-Magee
On Fri, Jan 29, 2010 at 6:51 PM, Sebastian Pawlus wrote: > Hi everyone > I've very confusing issue related whit databases performance. I've took two > database engines and compared their performance during typical run for > project test suite. > results: > MySQL: Ran 241 tests in 533.822s > Postgr

Re: Database performance during test execution

2010-01-29 Thread Russell Keith-Magee
On Fri, Jan 29, 2010 at 10:38 PM, Sebastian Pawlus wrote: > Thanks Russell, your answer was more than helpful. It really worked for me. > There were some problems on Django 1.0 but after that (1.1 and up) every > thing looks good. Performance of database looks much better right now. > I'm also wan

Re: ManyToMany Performance

2010-01-30 Thread Russell Keith-Magee
On Sun, Jan 31, 2010 at 1:38 AM, chefsmart wrote: > Let's say I have two models -  Article and Publication. Article has a > field > > publications = models.ManyToManyField(Publication) > > Let's say I present the user with a series of checkboxes representing > publications (much like the ModelMult

Re: test fixtures

2010-02-01 Thread Russell Keith-Magee
On Mon, Feb 1, 2010 at 10:01 PM, knight wrote: > Hi, > > I want to use some fixtures in my tests. > I have cms_sample app and a fixtures folder inside with > cms_sample_data.xml > > I use the following in my test.py: > > class Funtionality(TestCase): >    fixtures = ['cms_sample_data'] There are

Re: Initial data fixtures and auto_now_add=True

2010-02-02 Thread Russell Keith-Magee
On Tue, Feb 2, 2010 at 3:58 PM, Andrew Turner wrote: > On Jan 19, 1:36 pm, Andrew Turner wrote: >> I have an initial_data.json file which provides some, er, initial data >> whenever I run syncdb. One of my models has a DateTimeField with >> auto_now_add=True. The data is loaded first time round,

Re: on latest svn am getting a type error TypeError: argument 1 must be str, not unicode

2010-02-02 Thread Russell Keith-Magee
On Tue, Feb 2, 2010 at 7:29 PM, Kenneth Gonsalves wrote: > On Tuesday 02 Feb 2010 4:04:15 pm Kenneth Gonsalves wrote: >> on upgrading to the latest svn I am getting a sporadic error like this: >> TypeError: argument 1 must be str, not unicode. On runserver, the full >> traceback is this: >> > > I

Re: Initial data fixtures and auto_now_add=True

2010-02-02 Thread Russell Keith-Magee
On Tue, Feb 2, 2010 at 5:12 PM, Andrew Turner wrote: > On Feb 2, 8:07 am, Russell Keith-Magee wrote: >> It is possible you've found a bug, but in order to verify that, we >> need a minimal example that reproduces the problem - that is, the >> simplest possible model an

Re: Initial data fixtures and auto_now_add=True

2010-02-02 Thread Russell Keith-Magee
On Tue, Feb 2, 2010 at 9:41 PM, Andrew Turner wrote: > On Feb 2, 1:29 pm, Russell Keith-Magee wrote: >> The cause of the problem is your initial fixture. Django doesn't >> listen to auto_now_add or auto_now fields on fixture loading - fixture >> objects are saved in &q

Re: on latest svn am getting a type error TypeError: argument 1 must be str, not unicode

2010-02-02 Thread Russell Keith-Magee
On Wed, Feb 3, 2010 at 12:03 PM, Kenneth Gonsalves wrote: > On Tuesday 02 Feb 2010 5:10:27 pm Russell Keith-Magee wrote: >> >> traceback is this: >> > >> > I went back to 12300 - same problem, but 12200 is ok. >> >> Kenneth - we need two things: &g

Re: on latest svn am getting a type error TypeError: argument 1 must be str, not unicode

2010-02-02 Thread Russell Keith-Magee
On Wed, Feb 3, 2010 at 1:46 PM, Kenneth Gonsalves wrote: > On Wednesday 03 Feb 2010 10:09:44 am Russell Keith-Magee wrote: >> > Exception Type: NameError at / >> > Exception Value: global name 'query' is not defined >> >> This isn't the

Re: save() got an unexpected keyword argument 'using'

2010-02-02 Thread Russell Keith-Magee
On Wed, Feb 3, 2010 at 2:12 PM, Ramdas S wrote: > I just upgraded to the latest trunk SVn 12377, and this error has started > propping up on some of my existing working code. > > Here is the traceback > > http://dpaste.com/153987/ > > > Apparently get_or_create is not working properly at least as

Re: on latest svn am getting a type error TypeError: argument 1 must be str, not unicode

2010-02-02 Thread Russell Keith-Magee
On Wed, Feb 3, 2010 at 2:41 PM, Kenneth Gonsalves wrote: > On Wednesday 03 Feb 2010 11:44:36 am Russell Keith-Magee wrote: >> Ok - seriously - if you want help debugging this, you need to get your >> story straight. > > please believe me - I *am* trying. Ok, lets try to be

Re: Multiple databases - syncdb

2010-02-03 Thread Russell Keith-Magee
On Mon, Feb 1, 2010 at 11:07 PM, Klemens Mantzos wrote: > hi list, > > checked out the new multidb feature > (http://docs.djangoproject.com/en/dev/topics/db/multi-db/). > > i assumed that syncdb would only sync those models in the database > when calling allow_syncdb() of the database routers retu

Re: Multiple databases - syncdb

2010-02-03 Thread Russell Keith-Magee
On Wed, Feb 3, 2010 at 11:02 PM, Klemens Mantzos wrote: > thx! > > syncdb is now calling the database router before actually syncing to > the db. but... > > ...stumbled upon a new problem: > > if i do > python manage.py syncdb --database=default > before i sync the users database this error comes

Re: You're seeing this error because you have DEBUG = True in your Django settings file.

2010-02-03 Thread Russell Keith-Magee
On Thu, Feb 4, 2010 at 1:15 PM, Shawn Milochik wrote: > http://catb.org/~esr/faqs/smart-questions.html You've posted this link a few times now, Shawn, but I'd rather you didn't make a habit of doing so. While ESR's point is valid, and many people would benefit from following the spirit of his ad

Re: Speeding the code-test-debug cycle

2010-02-05 Thread Russell Keith-Magee
On Sat, Feb 6, 2010 at 1:25 AM, Malcolm Box wrote: >> From there, I have only been able to reduce test time down from hours >> to minutes. Tests ought to run in seconds - so fast that you can run >> them after every few edits - TDD. > > Totally agree, and what I'm looking to make Django do.  At t

Re: django admin interface

2010-02-08 Thread Russell Keith-Magee
On Mon, Feb 8, 2010 at 10:42 PM, Andy Cottell wrote: >> > > I am new to django, and have started building a project in it. I have >> > > tried to use theadmininterface with the project am having issues >> > > logging in. I have setup the interface as instruced in the django >> > > tutorial part 2,

Re: Possible bug with django 1.2, postgresql and aggregates?

2010-02-08 Thread Russell Keith-Magee
On Tue, Feb 9, 2010 at 2:08 AM, Mathieu Pillard wrote: >> It may indeed be that the MAX clause is using "mat_foo" instead of the >> assigned correlation U0. What happens if you paste the two SQLs into a >> query window in PgAdmin 3 and execute them. If the 1.2 query fails >> with the same error me

Re: How can _meta.local_fields not match the table schema in the database?

2010-02-08 Thread Russell Keith-Magee
On Mon, Feb 8, 2010 at 1:10 AM, br...@instantdirectmarketing.com wrote: > I'm completely confused about why _meta.local_fields returns more > fields than the database table contains. The User model inherits from > contrib.auth.models.User. ... > I wonder if the User.add_to_class would be interpret

Re: Django Generator

2010-02-10 Thread Russell Keith-Magee
On Wed, Feb 10, 2010 at 6:48 PM, Atamert Ölçgen wrote: > On Tuesday 09 February 2010 22:58:32 Brice Leroy wrote: > * Please remove `auto_now` and `auto_now_add` since they're deprecated. No, they really aren't. If they were deprecated, there would be deprecation warnings in the code and document

Re: csrf migration

2010-02-10 Thread Russell Keith-Magee
On Thu, Feb 11, 2010 at 12:22 PM, Jeff Bauer wrote: > Update: My work-around is this: > > 1) Wrap views functions: >    try: >        import django.views.decorators.csrf >        # Django 1.2 stuff >    except ImportError: >        # Django 1.1 stuff > > 2) If running Django 1.1, register a fake c

Re: Django Transactions at the Model Level

2010-02-11 Thread Russell Keith-Magee
On Thu, Feb 11, 2010 at 8:55 AM, khoobks wrote: > Hi Everyone, > > I was wondering if a Django guru was able to verify if my mental model > of how django transactions operate is correct. > > The situation that I have is that I'd like to place the > transaction.commit_on_success decorator around a

Re: Why is the post syncdb hook signal not called 'post' syncdb?

2010-02-14 Thread Russell Keith-Magee
On Mon, Feb 15, 2010 at 12:41 AM, monkut wrote: > Just curious, but I was looking at using the post-syncdb hook and > found that it's actually called *before* the complete syncdb command > finishes.  (Custom and indicies are run after the signal) > > http://docs.djangoproject.com/en/dev/ref/signal

Re: How do I manually set the "GROUP BY" for a django queryset?

2010-02-14 Thread Russell Keith-Magee
On Mon, Feb 15, 2010 at 6:30 AM, Greg wrote: > I have a large-ish query which is taking ~10 seconds to run, but I can > get it down to less than a second by changing the group by part of the > query from > >    GROUP BY `refunds_userprofile`.`ird_number` , > `auth_user`.`first_name` , `auth_user`.

Re: How do I manually set the "GROUP BY" for a django queryset?

2010-02-16 Thread Russell Keith-Magee
On Tue, Feb 16, 2010 at 4:43 AM, Greg Brown wrote: > Ok, here goes: > > First, some background - UserProfile is the > settings.AUTH_PROFILE_MODULE and the Application model has a > ForeignKey to User. There's ~90,000 users/userprofiles, ~110,000 > applications (most have only one application, some

Re: anybody tried web2py and gone back to Django?

2010-02-19 Thread Russell Keith-Magee
On Fri, Feb 19, 2010 at 1:37 PM, mdipierro wrote: > I apologize for intruding and try not to be partisan. I will not list > pros and cons since this is not the place for me to do so. > I would just like to make clarifications about things being said: And I would like to clarify some of your clari

Re: anybody tried web2py and gone back to Django?

2010-02-19 Thread Russell Keith-Magee
On Fri, Feb 19, 2010 at 8:16 PM, mdipierro wrote: > Sorry Russ, > > I did not say nor implied that any of the points above were > distinctive or unique. I just tried to clarify some issues raised by > other users here. No problems - I'm not trying to accuse you of anything nefarious. I just wante

Re: South trunk with Django trunk? (wierd error)

2010-02-20 Thread Russell Keith-Magee
2010/2/20 Norbert Wójtowicz : > Howdy, > Just started a new project with Django trunk (have been using Django 1.1 > lately, so please bare with me). > After I got a basic setup going I installed the latest release of south, but > that bombed spectacularly with database errors in settings.py. ... >

Re: anybody tried web2py and gone back to Django?

2010-02-20 Thread Russell Keith-Magee
On Sat, Feb 20, 2010 at 11:56 AM, Russell Keith-Magee wrote: > Yes, I are > free to choose whatever license you want for your own code, but the > terms of the GPL mean that your own choice of license on your own > project *may* affect whether or not I can distribute Web2py along wi

Re: Passenger 57 - a Django query problem

2010-02-20 Thread Russell Keith-Magee
On Sun, Feb 21, 2010 at 4:11 AM, Sithembewena Lloyd Dube wrote: > I wonder what Atamert the peacemaker has to say now, since the person to > whose defense he came admitted he was wrong. Amazing to note that Atamert > noticed my directness to Bruno, but did not notice how nasty Bruno was to > other

Re: Do Django TestCases reload fixtures on every method?

2010-02-21 Thread Russell Keith-Magee
On Sun, Feb 21, 2010 at 11:20 PM, bobhaugen wrote: > I see here http://toastdriven.com/fresh/whats-wrong-django-slight-return/ > a claim that "TestCase-style tests truncate and reload all the > fixtures in your database on every test method". > > Is that true? Yes. From the docs [1]: """ This flu

Re: apparent bug in QuerySet

2010-02-22 Thread Russell Keith-Magee
On Mon, Feb 22, 2010 at 4:48 AM, felix wrote: > > This seems so blatant that it couldn't really be a bug without someone > noticing. Django 1.2 > >        qs = Apt.objects.filter(list_on_web=True,is_available=True) > >         # FastAdderStatus has Apt and Service as fk >        qs = qs.filter(fas

Re: how to get as_sql() to work again

2010-02-22 Thread Russell Keith-Magee
On Mon, Feb 22, 2010 at 2:41 AM, felix wrote: > As of 1.2 and multi-db how do I get the sql that will be produced from > a query set ? > > Since 1.2 and multi-db, the previous methods are no longer working. > Its been said here that we shouldn't depend on internal functions as > they may change. >

Re: how to get as_sql() to work again

2010-02-22 Thread Russell Keith-Magee
On Tue, Feb 23, 2010 at 1:17 AM, felix wrote: > > On Feb 22, 9:22 am, Russell Keith-Magee > wrote: >> > However getting the SQL that will be produced is essential.  There >> > needs to be a utility method somewhere that will give us this sql and >> > it ne

Re: how to get as_sql() to work again

2010-02-22 Thread Russell Keith-Magee
On Tue, Feb 23, 2010 at 10:42 AM, felix wrote: > > On Feb 23, 12:32 am, Russell Keith-Magee > wrote: > >> To reinforce my point - if you're using Django's ORM, you shouldn't >> have to care about the underlying query. The ORM *should* be >> abstra

Re: does current aggregation api support counting by month?

2010-02-23 Thread Russell Keith-Magee
On Wed, Feb 24, 2010 at 1:01 AM, Manolis wrote: > Hello, > I have a model like this: > class Report(models.Model): >    date_submitted = models.DateTimeField() > > I want to calculate some aggregate counts per month. The SQL query for > this would be: > SELECT YEAR(date_submitted), MONTH(date_subm

Re: Fascism is coming to Internet

2010-02-23 Thread Russell Keith-Magee
On Tue, Feb 23, 2010 at 10:11 PM, Joan Miller wrote: > *Sorry by this off topic message, but this is too important* I'm sure you're deeply concerned by this issue. For the record, I am too. However, everyone thinks that their pet issue is more important than the rules. Allow me to assure you that

Re: Multiple DB in django 1.2

2010-02-25 Thread Russell Keith-Magee
On Fri, Feb 26, 2010 at 2:08 AM, Roach, Marshall (MROACH) wrote: > Hi, I was at pycon last week and heard about the db routers in django 1.2 > and I have the alpha version of django running for a project I’m running and > trying to figure out how to do the following. > > I have 2 databases on diff

Re: Do fixtures in tests overwrite default model field values?

2010-02-25 Thread Russell Keith-Magee
On Thu, Feb 25, 2010 at 8:43 PM, filias wrote: > Hi, > > I am running several tests and created a fixture with the test data. > I have one model with a custom field which has a default value. > > I thought my test fixture should overwrite this field for some of the > objects but when run the test

Re: fixtures getting created with terminal message prefixed

2010-02-26 Thread Russell Keith-Magee
On Sat, Feb 27, 2010 at 4:07 AM, Joel Stransky wrote: > When ever I create a fixture via dumpdata, I get this text prior to the > start of the data. > > Please select your server identifier. >    1) admin >    2) aws >    3) dipsy >    4) dot >    5) local >    6) sdeng >    7) soup >    8) tomcat

Re: Date fields and Django’s loaddata

2010-02-28 Thread Russell Keith-Magee
On Mon, Mar 1, 2010 at 2:04 AM, Michael Shafrir wrote: > Can a date be loaded into a DateField using Django's loaddata admin > feature? I have a JSON file that I'm using to bulk load data into my > app. When you dumpdata, date fields are outputted in the format - > mm-dd. However, if you try l

Re: Application Name Cannot be the Same as Site Name - is this true?

2010-02-28 Thread Russell Keith-Magee
On Sun, Feb 28, 2010 at 3:33 PM, Anthony wrote: > I've got my app deployed on my production server where the application > name == site name.  (It's running fine.) > > I copied it down to my development machine and tried to set up the > same thing ('python manage.py startapp [appname==sitename]'),

Re: Serializing objects with a many-to-many reference

2010-03-02 Thread Russell Keith-Magee
On Wed, Mar 3, 2010 at 12:46 AM, Jim N wrote: > Hi, > > I am writing a question-and-answer app which serializes data in JSON. > I have Question, User, and Asking models.  Asking is the many-to-many > relationship table for Question and User, because the Asking > relationship may be more complicate

Re: Serializing objects with a many-to-many reference

2010-03-03 Thread Russell Keith-Magee
On Thu, Mar 4, 2010 at 1:36 AM, Jim N wrote: > I just came across manager methods in the docs: > > http://docs.djangoproject.com/en/dev/topics/db/managers/#adding-extra-manager-methods > > Could I have used these to create a seriallizable QuerySet, by > defining, say, a with_user() method inside t

Re: Fail after upgrade to Django 1.2

2010-03-04 Thread Russell Keith-Magee
On Thu, Mar 4, 2010 at 9:54 PM, eXt wrote: > Hi! > >   I've upgraded my Django to 1.2 (1.2-beta-1, tried also trunk) and > after that my application has started to throw an exception: > ValueError: Cannot add "": instance is on database > "default", value is is on database "None". > > The code cau

Re: Question!!!

2010-03-05 Thread Russell Keith-Magee
On Sat, Mar 6, 2010 at 6:55 AM, Kenny Meyer wrote: > Wilmer A. Delpratt (wdelprat...@gmail.com) wrote: >> Hi everyone..i'm new in this group...my friends says this is one of >> the best groups... >> I'd like to know how i can use a ManyToManyField in a "list_display", >> i've read the documentatio

Re: Adding a new convenience filter 'contains_any'

2010-03-05 Thread Russell Keith-Magee
On Sat, Mar 6, 2010 at 9:09 AM, Phlip wrote: >> >>> (I also disagree with leaving out the spaces around =, but obviously >> >>> obeying a team style guide supersedes improving it...) >> >> >> ... the goal of clarity/legibility >> >> > uh... >> >> ;)  I meant *having* a style guide was consistent w

Re: v1.2 roadmap - translation string freeze?

2010-03-07 Thread Russell Keith-Magee
On Mon, Mar 8, 2010 at 8:14 AM, Aljosa Mohorovic wrote: > according to http://code.djangoproject.com/wiki/Version1.2Roadmap RC1 > marks translation string freeze, any updates on roadmap? We've been discussing this amongst the core; we should be making some sort of formal announcement shortly, but

Re: Maintaining Continuity (after editing) in the Admin interface?

2010-03-07 Thread Russell Keith-Magee
On Mon, Mar 8, 2010 at 2:24 PM, Derek wrote: > I have noticed that, if a change list has been filtered before a record is > edited, the filter is not restored after the editing operation is complete. > > a. Is there a way to automatically restore the filtered view and, if so, > how? > > b. If ther

Re: Adding a new convenience filter 'contains_any'

2010-03-08 Thread Russell Keith-Magee
On Tue, Mar 9, 2010 at 3:24 AM, Phlip wrote: >> > And if the PEP8 told you to ... just jump off a cliff... would you? >> >> Sounds like you might benefit from actually reading it: > > This thread arc is about me lamenting the positive value of style > guides, even those with wrong line-items. > >

Revised 1.2 release schedule

2010-03-09 Thread Russell Keith-Magee
Hi all, Those of you that have been paying attention to the Django release roadmap [1] will have noticed that the original estimated release date for Django 1.2 final has passed, but we haven't actually made a final release. Although Django aims to follow a date-based release cycle, we won't make

Re: Serializing objects with a many-to-many reference

2010-03-09 Thread Russell Keith-Magee
On Wed, Mar 10, 2010 at 1:57 AM, Jesus Mager wrote: > 2010/3/2 Russell Keith-Magee : >> On Wed, Mar 3, 2010 at 12:46 AM, Jim N wrote: >>> Hi, > >> The short answer is you can't - at least, not out of the box. This is >> a feature that has been proposed seve

Re: 1.1.2

2010-03-10 Thread Russell Keith-Magee
On Thu, Mar 11, 2010 at 11:16 AM, brad wrote: > Hi all > > When can we expect a release of 1.1.2? Specifically I'm hoping to get > a test bug fixed - http://code.djangoproject.com/ticket/12720 The most likely scenario is that we will cut 1.1.2 at the same time we cut 1.2-final. The exact date dep

Re: How to cache the output of Django 1.2 RSS class based views?

2010-03-11 Thread Russell Keith-Magee
On Thu, Mar 11, 2010 at 10:01 PM, Brian Neal wrote: > On Mar 7, 10:48 pm, Brian Neal wrote: >> Before the Django 1.2 beta and the class-based Feed views, I was doing >> this to cache my RSS feeds: >> >> urls.py: >> from django.contrib.syndication.views import feed as syndication_feed >> from djan

Re: a bug (i think) with dynamic inlines and ManyToMany relationships

2010-03-14 Thread Russell Keith-Magee
On Sat, Mar 13, 2010 at 8:33 PM, Simon wrote: > Hi all, > > I've found what I think is a bug in django 1.2 beta 1 (SVN-12773). > > The dynamic inlines works great with foreign key relationships, but > the "Add another xxx" link doesn't appear with ManyToMany > relationships.  It seems to be becaus

Re: multi natural_key dependencies problem

2010-03-15 Thread Russell Keith-Magee
On Tue, Mar 16, 2010 at 11:34 AM, victor wrote: > how to set multi natural_key dependincies? > Model code as following: > class Menu(models.Model): >    mName = models.CharField(max_length=256) >    mTitle = models.CharField(max_length=256) >    url = models.CharField(max_length=1024, blank=True,

Re: Authentication system : should I use contrib.auth or reinvent the wheel?

2010-03-19 Thread Russell Keith-Magee
On Sat, Mar 20, 2010 at 9:55 AM, Peyman wrote: > Thank you for your reply. > After having a look at its code, it seems that django-registration > provides the signup feature, and uses contrib.auth for the rest. > > I looked at the source code of the djangoproject.com site itself (for > me, should

Re: Multi Database Question

2010-03-19 Thread Russell Keith-Magee
On Fri, Mar 19, 2010 at 10:19 PM, mbdtsmh wrote: > This makes alot of sense and works in my case - many thanks. > > However, still unclear as to how to specify which table should be > created in which database when you do want to syncdb to both > databases. I may have 2 tables in models.py that I

Re: Making a "Common causes for translation problems"

2010-03-19 Thread Russell Keith-Magee
On Fri, Mar 19, 2010 at 9:16 PM, cool-RR wrote: > Hello Django community, > > I have started compiling a list, "Common causes for translation > problems". Where would be a good place to put this list so people who > have a problem with their translations will be most likely to > encounter it? Dep

Re: Issue with aggregate_select changes

2010-03-23 Thread Russell Keith-Magee
On Tue, Mar 23, 2010 at 5:53 AM, David Cramer wrote: > One of the recent changes in trunk was a change to how querysets were > cloned. Due to this, some old code we had is no longer working. This > was a custom aggregate which relied on "aggregate_select" (see below). > I believe the change I'm re

Re: Django ORM

2010-03-23 Thread Russell Keith-Magee
On Tue, Mar 23, 2010 at 9:55 PM, jrs wrote: > I have a statement--- > >    Container.objects.get( >         pk=container_id >    ).delete() > > This seemingly trivial operation hammers the db with 581 queries!! > The reason being that the django orm has decided that it will enforce > referential i

Re: Django ORM

2010-03-23 Thread Russell Keith-Magee
On Tue, Mar 23, 2010 at 10:21 PM, jrs wrote: > > > On Mar 23, 10:05 am, "ge...@aquarianhouse.com" > wrote: >> Filter would be better :) >> >> Container.objects.filter( >>           pk=container_id >>      ).delete() > > Why is filter better here, since it's a one record delete? It isn't. > Also

Re: Django ORM

2010-03-23 Thread Russell Keith-Magee
On Tue, Mar 23, 2010 at 11:04 PM, jrs wrote: > Thanks Russ > > On Mar 23, 10:33 am, Russell Keith-Magee > wrote: >> On Tue, Mar 23, 2010 at 10:21 PM, jrs wrote: >> >> > On Mar 23, 10:05 am, "ge...@aquarianhouse.com" >> > wrote: >> >

Re: assert_performant(query_set)

2010-03-23 Thread Russell Keith-Magee
On Wed, Mar 24, 2010 at 4:56 AM, Phlip wrote: > Djangoists: > > Suppose I want a test to fail if the database would respond to a given > QuerySet without using my favorite index. > > This test case would attempt, at developer test time, to solve the > same problem as a "soak test" would, at accept

Re: Disabling Messaging

2010-03-23 Thread Russell Keith-Magee
On Wed, Mar 24, 2010 at 5:01 AM, jrs wrote: > Thanks Preston. > > I'm not using django's messaging... at all.  My problem is that for > every ajax request, the query- > > {'time': '0.000', 'sql': u'SELECT `auth_message`.`id`, > `auth_message`.`user_id`, `auth_message`.`message` FROM `auth_message`

Re: Django ORM

2010-03-23 Thread Russell Keith-Magee
On Wed, Mar 24, 2010 at 6:22 AM, jrs wrote: > Another great example... If PostgreSQL has referential integrity on by > default, is django still hammering the db with unnecessary queries? In this case, for two reasons - MySQL, and generic foreign keys. Fisrtly, we aim to guarantee consistent beha

Re: Django ORM

2010-03-23 Thread Russell Keith-Magee
On Wed, Mar 24, 2010 at 5:35 AM, jrs wrote: > Clifford, > > Ask the previous engineering staff of Twitter if it's dangerous. When you're using the wrong shovel to hammer in a screw, you don't blame the shovel. Yours, Russ Magee %-) -- You received this message because you are subscribed to the

Re: possible bug or feature request with extra and where

2010-03-23 Thread Russell Keith-Magee
On Sun, Mar 21, 2010 at 8:17 AM, Henrik Genssen wrote: > No one any comment on this? > is this the expected behavior? ... >>Now is there a way to force select_related tables any way in a count? select_related() is an optimization for data retrieval. It allows you to expand a select row to include

Re: Re: possible bug or feature request with extra and where

2010-03-24 Thread Russell Keith-Magee
On Wed, Mar 24, 2010 at 2:57 PM, Henrik Genssen wrote: > Hi, > > thanks for your answer! > Now is there a way to force select_related tables any way in a count? >> >>select_related() is an optimization for data retrieval. It allows you >>to expand a select row to include related objects in a s

Re: Disabling Messaging

2010-03-24 Thread Russell Keith-Magee
On Wed, Mar 24, 2010 at 9:16 PM, jrs wrote: > I'm using 1.1.1 now.  Any idea when there will be a 1.1.2 release?  Is > the current branch considered stable? 1.1.2 will be released at the same time as 1.2; current estimate is mid April. We only ever backport bugfixes from trunk to the stable bran

Re: tests fail for django.contrib.auth

2010-03-26 Thread Russell Keith-Magee
2010/3/24 Filip Gruszczyński : > When I run all tests, tests for django.contrib.auth. I tried googling > it and found information, that django.contrib.sites is required, but I > have this app installed. I was also advised to use > TEMPLATE_CONTEXT_LOADERS, but this didn't help. Have anyone > encoun

Re: Django 1.2b multidatabase + manytomany relationship

2010-03-26 Thread Russell Keith-Magee
On Wed, Mar 24, 2010 at 6:16 PM, mbdtsmh wrote: > Hi All, still trying to get my head around the multi db stuff in 1.2 > release. > > Here is my problem that I have hit upon. > > I have a model in my default db... > > class Set1(models.Model): >    create_date = models.DateTimeField(auto_now_add='

Re: Any way to have a ModelForm tied to 2 Models?

2010-03-26 Thread Russell Keith-Magee
On Fri, Mar 26, 2010 at 9:11 AM, Continuation wrote: > I have 2 models: A, B > > I need a form that inserts/updates both fields of A and fields of B. > > Is there any way to create a ModelForm tied to A & B? Or do I need to > use the plain old Form? Why not just use two forms? There's no limitati

Re: Problem with cross-database foreign-keys and select_related

2010-03-26 Thread Russell Keith-Magee
On Fri, Mar 26, 2010 at 10:54 PM, greatlemer wrote: > Hi, > > I'm running the django 1.2 beta and am testing out the multi-db > system.  Unfortunately I have run into an issue where I have: > > class A(models.Model): >    name = models.CharField() >     > > class B(models.Model): >    a = models.F

Re: Tests for contrib.flatpages

2010-03-26 Thread Russell Keith-Magee
On Fri, Mar 26, 2010 at 9:42 PM, Bjunix wrote: > Hi all, > > I am looking for tests for the flatpages app. I can't find any. Do I > miss something or ships django without tests for flatpages? You're not missing anything; for historical reasons (specifically, that flatpages was written before Djan

Re: Testing email with the testserver

2010-03-26 Thread Russell Keith-Magee
On Fri, Mar 26, 2010 at 11:29 PM, Ben Gerdemann wrote: > I found the Django documentation about testing E-mail services > confusing. It says here > http://docs.djangoproject.com/en/1.1/topics/testing/#e-mail-services > "Django's test runner automatically redirects all Django-sent e-mail > to a du

Re: mod_wsgi broken in rev #12866

2010-03-28 Thread Russell Keith-Magee
On Sun, Mar 28, 2010 at 10:12 PM, nih wrote: > One of the files modified in django rev #12866 has broken mod_wsgi for > me, the web app loads perfectly ok in rev #12865, the apache mod_wsgi > log when using django rev #12866 has: > ... > none of the changed files in rev #12866 look like they have

Re: mod_wsgi broken in rev #12866

2010-03-28 Thread Russell Keith-Magee
On Mon, Mar 29, 2010 at 12:40 AM, nih wrote: > oops sorry, typo in the last paragraph :( > > It only crashes for me with apache, mod_wsgi, new project (no views/ > models/etc), finished project, and rev # 12866+. > > They all work normally with the dev server and rev # 12866+, so that > pretty muc

Re: download html django docs

2010-03-28 Thread Russell Keith-Magee
On Mon, Mar 29, 2010 at 5:24 AM, Django Grappelli wrote: > hi everyone, > quick question: > is it possible to download the django docs in html somewhere so that i don't > have to use the rest text ones when i'm developing offline? No, but if you install sphinx (pip install sphinx), you can compil

Re: django version detection

2010-03-28 Thread Russell Keith-Magee
On Mon, Mar 29, 2010 at 8:07 AM, Mike Dewhirst wrote: > Can someone kindly tell me how I can detect which subversion revision of > Django is actually installed on my machine? > > I need to re-install the exact same revision on another platform. > > It is probably staring me in the face but I must

Re: Using Mako as a templating language

2010-03-29 Thread Russell Keith-Magee
On Mon, Mar 29, 2010 at 12:34 AM, Colin wrote: > After struggling with Django's templating language for a while, I > decided I wanted to switch to something with a bit more power. In > particular, I liked what I saw of Mako (being able to instantiate new > variables, and write functions for subrou

Re: assert_performant(query_set)

2010-03-29 Thread Russell Keith-Magee
On Tue, Mar 30, 2010 at 12:05 AM, Phlip wrote: >> qs.query.get_compiler(qs.db).as_sql() > > That gives this error message with the usual zero Google hits for that > error message: > >  AttributeError: 'BaseQuery' object has no attribute 'get_compiler' Sorry - a point of clarification. the techniq

Re: auth.Message ignores directions from database router - Possible RelatedManager bug

2010-03-31 Thread Russell Keith-Magee
On Mon, Mar 29, 2010 at 9:28 AM, xin wrote: > I am unsure if this a bug in Django, or django-multidb-router, or > something I've done wrong. > > I'm using django-multidb-router from here: > http://github.com/jbalogh/django-multidb-router > With two database definitions, a read_only_user and a rea

Re: Table in models.py not being created during syncdb

2010-03-31 Thread Russell Keith-Magee
On Thu, Apr 1, 2010 at 1:16 AM, wchildsuk wrote: > Hi, > > I'm using the django app, django-schedule (http://github.com/thauber/ > django-schedule) and am adding an additional table to map users to > calendars (see line 253 on dpaste).  When I run syncdb it completely > ignores my table and doesn'

Re: Getting strange email from "dreamhost"

2010-03-31 Thread Russell Keith-Magee
On Wed, Mar 31, 2010 at 11:13 PM, Wiiboy wrote: > Hi guys, > I've gotten two emails from "Mail Delivery Subsystem > " with the subject "Your message was NOT > received by django-us...@googlegroups.com!". > The body is below.  Anyone know why I'm getting these?  Is anyone else > getting them?  I ha

Re: Getting strange email from "dreamhost"

2010-03-31 Thread Russell Keith-Magee
On Thu, Apr 1, 2010 at 7:55 AM, Russell Keith-Magee wrote: > On Wed, Mar 31, 2010 at 11:13 PM, Wiiboy wrote: >> Hi guys, >> I've gotten two emails from "Mail Delivery Subsystem >> " with the subject "Your message was NOT >> received by django

Re: ORM: get, filter and DoesNotExist

2010-04-04 Thread Russell Keith-Magee
On Mon, Apr 5, 2010 at 11:33 AM, zweb wrote: > after some debugging, just found out that > filter method does not throw DoesNotExist while get does. get() returns a single object. If a single object does not exist, you get a DoesNotExist exception. This is documented: http://docs.djangoproject.c

Re: url template tag taking a long time

2010-04-06 Thread Russell Keith-Magee
On Wed, Apr 7, 2010 at 12:08 PM, Brian Neal wrote: > I am on trunk, somewhere around revision 127xx and just updated to > 12936. A couple of my views render this one particular template, which > used to take less than a second to see a response. Now it is taking > almost a minute. The Django debug

Re: DB Adapter for HTML5 Client Database Storage?

2010-04-07 Thread Russell Keith-Magee
On Wed, Apr 7, 2010 at 3:45 PM, Victor Hooi wrote: > heya, > > This is a bit of random musing, but I was wondering, how big a project > is it to write a DB adapter for the Client-side Client-side Database > Storage API in HTML5? > > That is, there are already efforts to integrate in things like Co

<    3   4   5   6   7   8   9   10   11   12   >