Re: Tutorial - How to create online games portal in several hours in Django?

2008-02-13 Thread NickJ
I've just had a skim through the first few tutorials and it looks like an excellent beginners tutorial, great stuff. I especially like the demo site running with admin access, so users can see the final result. One minor thing I noticed while goign through tutorial 2 - you probably want to make y

Re: Web Development with Django: Windows vs Linux/Mac OS X

2008-02-10 Thread NickJ
I am a long time windows user, and have just switched to ubuntu gutsy for the very reason of python and django development. Although the learning curve was very steep - and i have had many hardware issues - i am now much happier developing on ubuntu (I have dual boot set up, but 95% of what i do c

Re: resizing an image

2008-02-08 Thread NickJ
; alternatively, you can store the data in the database. See the model-api on ImageField for details. On Feb 8, 12:03 pm, NickJ <[EMAIL PROTECTED]> wrote: > Does offsetWidth return what you want? this should represent the total > "space" the element takes up (width

Re: resizing an image

2008-02-08 Thread NickJ
Does offsetWidth return what you want? this should represent the total "space" the element takes up (width, borders, padding etc) document.getElementById("myimage").offsetWidth (http://developer.mozilla.org/en/docs/DOM:element.offsetWidth) On Feb 8, 11:57 am, "Lic. José M. Rodriguez Bacallao"

Re: Dumping objects in templates

2008-02-08 Thread NickJ
I don't know of anything out-of-the-box in python or in django, but it should be pretty easy to write your own debug function. Python supports excellent introspection. A very basic start would be something like: def debug(obj): ret = "" for attr in dir(obj): ret += "%s - %s" %

Re: OneToOne Relationships

2008-02-07 Thread NickJ
Is there a working version of this in trunk or a branch? On Feb 6, 12:10 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-02-05 at 17:51 -0800, Vance Dubberly wrote: > > The Documentation has said for as long as I can remember (a year+) > > that the semantics of a the OneToOne rel

Re: New Django Site - tsacomplaints.com

2008-02-07 Thread NickJ
Looking good. - If you type in an incident and perform the captcha correctly, but have validation errors, you have to redo the captcha. This may be by design. - The airport isn't filled in automatically for URLs such as http://www.tsacomplaints.com/complain/?code=291 (if you click through from h

Re: newforms-admin replacement for core=True in inline models?

2008-02-03 Thread NickJ
newforms-admin and get a replication of the error. (whilst I´m at it, I found another issue with admin (both newforms and normal) with this model: it was throwing very strange errors with any URL field set as unique=True) On Feb 2, 4:03 am, "Karen Tracey" <[EMAIL PROTECTED]>

Re: newforms-admin replacement for core=True in inline models?

2008-02-01 Thread NickJ
. Cheers Nick Russell Keith-Magee wrote: > On Feb 2, 2008 4:32 AM, NickJ <[EMAIL PROTECTED]> wrote: > > > > I wanted to bump this up, because if there is no solution I think this > > is an issue which needs to be rectified before it is merged to trunk. > > There is

Re: newforms-admin replacement for core=True in inline models?

2008-02-01 Thread NickJ
I wanted to bump this up, because if there is no solution I think this is an issue which needs to be rectified before it is merged to trunk. As Felix noted, without core=True support, anything listed as in-line *has to be created when you create the parent object. e.g. if a Pizza can have 1+ toppi

newforms-admin and OneToOne field

2008-01-30 Thread NickJ
In contrib.admin in django trunk, on a one-to-one relationship, the + mark exists that pops up a window to allow you to add the related 'base' field, working exactly the same as a ForeignKey field. Testing out newforms-admin, I see this functionality has been removed, at least by default. Is ther

Re: Using queryset values() spanning relationships

2007-08-16 Thread NickJ
That works perfectly, thanks. I was going about it the wrong way with values(). On Aug 14, 7:16 pm, Collin Grady <[EMAIL PROTECTED]> wrote: > Author.objects.filter(book__publisher__id=1).distinct() doesn't work? --~--~-~--~~~---~--~~ You received this message bec

Re: Using queryset values() spanning relationships

2007-08-14 Thread NickJ
drop in to SQL for now. On Aug 14, 4:34 pm, NickJ <[EMAIL PROTECTED]> wrote: > Take 3 models: > > class Publisher(models.Model): > name = models.CharField() > > class Author(models.Model): > name = models.CharField() > > class Book(models.Model)

Using queryset values() spanning relationships

2007-08-14 Thread NickJ
Take 3 models: class Publisher(models.Model): name = models.CharField() class Author(models.Model): name = models.CharField() class Book(models.Model): publisher = models.ForeignKey(Publisher) authors = models.ManyToManyField(Author) i.e. a book must have one or more authors,