Re: same code runs on two machines and barfs on the third

2012-02-07 Thread kenneth gonsalves
On Tue, 2012-02-07 at 19:29 +1100, Mike Dewhirst wrote: > On 7/02/2012 6:14pm, kenneth gonsalves wrote: > > On Tue, 2012-02-07 at 08:06 +0100, Babatunde Akinyanmi wrote: > >> Perhaps you made a change to a model and forgot to syncdb on your > >> Fedora 15 machine. > > > > When you have

Re: Django (and Python) speakers

2012-02-07 Thread Jeremy Dunck
I'd also like to see Malcolm again, but I fear that'll take a trip to Sydney. :) On Tue, Feb 7, 2012 at 9:29 PM, Jeremy Dunck wrote: > The original musketeers, Jacob, Simon, and Adrian, are all great > speakers, of course. > > I thought Jeff Balough, Mike Malone, and Eric

Re: Django (and Python) speakers

2012-02-07 Thread Jeremy Dunck
The original musketeers, Jacob, Simon, and Adrian, are all great speakers, of course. I thought Jeff Balough, Mike Malone, and Eric Florenzano did very well on their talks. David Cramer represents Disqus well and has recently released Sentry 2. As a particular pain points for me, I'd like to

Re: AssertFieldOutput

2012-02-07 Thread akaariai
On Feb 8, 4:16 am, xina towner wrote: > Can anyone explain me exactly how assertFieldOutput works?? For that question there is exactly one answer: https://code.djangoproject.com/browser/django/trunk/django/test/testcases.py#L362 - Anssi -- You received this message

Re: could i use a select?

2012-02-07 Thread akaariai
On Feb 8, 7:08 am, Vittorino Parenti wrote: > Hi, > I've an Invoice Model: > > class Invoice(models.Model): >     ... >     number = models.IntegerField(...) >     customer = models.ForeignKey() >     date_invoice = ... >     total_invoice = ... >     ... > > To have

could i use a select?

2012-02-07 Thread Vittorino Parenti
Hi, I've an Invoice Model: class Invoice(models.Model): ... number = models.IntegerField(...) customer = models.ForeignKey() date_invoice = ... total_invoice = ... ... To have the top ten customer can i do? I have to use a select: SELECT SUM(total_invoice) AS total FROM

Re: Can prefetch_related() look up reverse relationship?

2012-02-07 Thread James DeMichele
That's awesome, thanks for sharing! -Jamie On Tue, Feb 7, 2012 at 7:55 AM, Jonathanz wrote: > I found it! The correct query shoud be > > Book.objects.all().prefetch_related('price_set') > > > On Feb 7, 5:38 pm, Jonathanz wrote: > > I'm using

AssertFieldOutput

2012-02-07 Thread xina towner
Can anyone explain me exactly how assertFieldOutput works?? -- Gràcies, Rubén -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to

Re: about QuerySet

2012-02-07 Thread newme
thank you so much. On Feb 7, 8:58 pm, Daniel Roseman wrote: > On Tuesday, 7 February 2012 11:36:04 UTC, newme wrote: > > > thank you. > > then a basic python question. > > how does queryset implement it? > > does python also allow operator (e.g. []) overloading? > > It's

Django (and Python) speakers

2012-02-07 Thread Steve Holden
I don't know if readers have heard the news that PyCon has closed registration early because it is full. So you may be interested in six new conferences, three about Python and three about Django, that we have just announced: http://www.prweb.com/releases/2012/1/prweb8945991.htm With this

Re: field of tuples

2012-02-07 Thread akaariai
On Feb 7, 11:44 am, Jaroslav Dobrek wrote: > Hello, > > how can I create a field that contains tuples of entities? An example: > A model "Candidate" (someone who applies for a job) might have a field > "languages" which is a list of tuples consisting of a language and a

Re: Models inheritance in django: how to change PK "_ptr_id" on "id"?

2012-02-07 Thread akaariai
On Feb 7, 8:26 pm, Artyom Chernetzov wrote: > Here is model structure: Client is User, Client can be corporate or person: > >     class Client(User): >         #fields > >     class ClientCorporate(Client): >         #fields > >     class ClientPerson(Client): >        

Re: Generic relationships between existing entities, many2many

2012-02-07 Thread akaariai
A pretty good way to do this is using custom hand-written generic foreign key. You basically need fields "type" (which can be just a string) and the related object's id. And then implement everything needed by yourself. Whatever you do you will have problems. There is no way to get all the

Re: number input format

2012-02-07 Thread akaariai
On Feb 7, 9:48 pm, Vittorino Parenti wrote: > I know but doesn't work. maybe it's my problem. In input form I see > '.'. > Thanks, > Vittorino. If I remember correctly, you must also have localize=True for your form fields. Maybe with correct settings.py this happens

list_editable raising a MultiValueDictKeyError

2012-02-07 Thread Nick
Whenever I use list_editable inside of the django admin attempting to save the data results in Exception Type: MultiValueDictKeyError Exception Value:"Key 'form-0-id' not found in Whenever I create custom forms I simply add in the form-0 inputs as a hidden field. How do I work

Re: number input format

2012-02-07 Thread Vittorino Parenti
I know but doesn't work. maybe it's my problem. In input form I see '.'. Thanks, Vittorino. On 7 Feb, 12:01, Denis Darii wrote: > from the django's global_settings: > > # Decimal separator symbol > DECIMAL_SEPARATOR = '.' > > # Boolean that sets whether to add thousand

Re: Models inheritance in django: how to change PK "_ptr_id" on "id"?

2012-02-07 Thread Andre Terra
I just read your e-mail quick and somewhat carelessly, so forgive me if I'm missing something. Here's a list of things for you to check: * Have you defined your Client model with abstract = True in its Meta options?[1] * Have you syncdb'd[2]? * If you must name your pk something else, just

Models inheritance in django: how to change PK "_ptr_id" on "id"?

2012-02-07 Thread Artyom Chernetzov
Here is model structure: Client is User, Client can be corporate or person: class Client(User): #fields class ClientCorporate(Client): #fields class ClientPerson(Client): #fields And client can make orders: class

Re: Can prefetch_related() look up reverse relationship?

2012-02-07 Thread Jonathanz
I found it! The correct query shoud be Book.objects.all().prefetch_related('price_set') On Feb 7, 5:38 pm, Jonathanz wrote: > I'm using django1.4 from svn trunk. > The models are as follows: > > class Book(models.Model): >     # some stuff > > class Price(models.Model): >

forwarding a email

2012-02-07 Thread kalyani ram
Hello, I am set up an email system with sending and receiving email and replying to the received email. But to add a forward email feature is complicating my work, as the content of the mail should be appended. can someone help me in doing the task. I want to forward an email just like it is done

Can prefetch_related() look up reverse relationship?

2012-02-07 Thread Jonathanz
I'm using django1.4 from svn trunk. The models are as follows: class Book(models.Model): # some stuff class Price(models.Model): book = models.ForgeinKey(Book) Each book can have many prices. My query in view: Book.objects.all().prefetch_related('price') I got this error: Cannot find

Re: about QuerySet

2012-02-07 Thread Daniel Roseman
On Tuesday, 7 February 2012 11:36:04 UTC, newme wrote: > > thank you. > then a basic python question. > how does queryset implement it? > does python also allow operator (e.g. []) overloading? > > It's not usually called overloading in Python, but yes. Classes can define a `__getitem__`

Re: Somebody please attend to me

2012-02-07 Thread coded kid
What I really mean is that I want users to post update and make other users comment on them in django site. Not to Facebook. On Feb 7, 12:24 pm, coded kid wrote: > The first link take me to google page. Is that the post? > > On Feb 7, 11:22 am, coded kid

Re: No Module named URLS

2012-02-07 Thread coded kid
Thank so much! I've figured it out. Have fun :) On Feb 6, 8:55 pm, Sandro Dutra wrote: > If I understand you're writing a template for admin, and this is not > required 'cause the admin template is called by the contrib > 'django.contrib.admin', in INSTALLED_APPS (settings

Re: about QuerySet

2012-02-07 Thread newme
thank you. then a basic python question. how does queryset implement it? does python also allow operator (e.g. []) overloading? On Feb 3, 5:29 pm, akaariai wrote: > On Feb 3, 5:52 am, newme wrote: > > > so it means when i call user[1] after user[0], it

Re: Somebody please attend to me

2012-02-07 Thread coded kid
The first link take me to google page. Is that the post? On Feb 7, 11:22 am, coded kid wrote: > Thanks so much kelly! You rock. Will give it a try! > > On Feb 7, 4:18 am, Kelly Nicholes wrote: > > > > > This is link holds the PERFECT answer for

Re: Somebody please attend to me

2012-02-07 Thread coded kid
Thanks so much kelly! You rock. Will give it a try! On Feb 7, 4:18 am, Kelly Nicholes wrote: > This is link holds the PERFECT answer for you:http://bit.ly/wc0psc > > If you want to do it differently, try: > > First you'll have to send an XMLHttpRequest (jQuery post() or

Re: field of tuples

2012-02-07 Thread Sam Basl
Wouldn't it be better to do this sort of thing with a related model? On Feb 7, 2012 4:44 AM, "Jaroslav Dobrek" wrote: > Hello, > > how can I create a field that contains tuples of entities? An example: > A model "Candidate" (someone who applies for a job) might have a

Re: number input format

2012-02-07 Thread Denis Darii
from the django's global_settings: # Decimal separator symbol DECIMAL_SEPARATOR = '.' # Boolean that sets whether to add thousand separator when formatting numbers USE_THOUSAND_SEPARATOR = False # Number of digits that will be together, when spliting them by # THOUSAND_SEPARATOR. 0 means no

number input format

2012-02-07 Thread Vittorino Parenti
Hi, I saw there is this setting DATE_INPUT_FORMATS for date. Is there a similar solution for the numbers? Thanks, Vittorino. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To

field of tuples

2012-02-07 Thread Jaroslav Dobrek
Hello, how can I create a field that contains tuples of entities? An example: A model "Candidate" (someone who applies for a job) might have a field "languages" which is a list of tuples consisting of a language and a proficiency level. Jaroslav -- You received this message because you are

Re: same code runs on two machines and barfs on the third

2012-02-07 Thread Mike Dewhirst
On 7/02/2012 6:14pm, kenneth gonsalves wrote: On Tue, 2012-02-07 at 08:06 +0100, Babatunde Akinyanmi wrote: Perhaps you made a change to a model and forgot to syncdb on your Fedora 15 machine. When you have eliminated all the possibilities what remains must be the problem :) The