Re: date time errors: please explain?

2006-03-01 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote: > that's because "one month" isn't a well-defined concept (what's > date(2006,1,31) plus one month, for example?). fwiw, according to http://sql-info.de/mysql/gotchas.html#1_14 mysql thinks that date(2006,1,31) is date(2006,2,31). also see the thread that starts a

Re: date time errors: please explain?

2006-03-01 Thread [EMAIL PROTECTED]
gizo wrote: > Correct me if I am wrong, but timedelta doesn't allow for months, does > it? that's because "one month" isn't a well-defined concept (what's date(2006,1,31) plus one month, for example?). here's a comp.lang.python post that points to a solution: http://article.gmane.org/gmane.com

Re: Model Basics

2006-03-01 Thread DaveW
Yeah, I'll have a play with doing just that - I'm getting to grips with Magic Removal at the moment! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Re: bug missing first symbol

2006-03-01 Thread Dmitry Sorokin
Ivan Sagalaev ÐÉÛÅÔ: >Grigory Fateyev wrote: > > > >>I have strange problem. Project has model and DEFAULT_CHARSET = >>'utf-8' with LANGUAGE_CODE = ru. After adding in admin some object via >>popup window (ForaignKey), main pagr refresh and first symbol of >>translated words look like square. W

Re: Django Admin

2006-03-01 Thread Adrian Holovaty
On 3/1/06, timster <[EMAIL PROTECTED]> wrote: > I've been using Django mostly just playing around and trying to get the > hang of things before I try anything serious. I'm using Apache and > FCGI, along with the magic-removal branch. > > Last night or the night before, I ran 'svn update' to get th

Re: date time errors: please explain?

2006-03-01 Thread gizo
Correct me if I am wrong, but timedelta doesn't allow for months, does it? --~--~-~--~~~---~--~~ 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

Re: FCGI Multiple Instances?

2006-03-01 Thread James Bennett
On 3/1/06, Sandro <[EMAIL PROTECTED]> wrote: > So does this mean that every "project" needs its own directory, or do > you setup a global django directory and put all of your django projects > in that directory? Have a look at this item in the documentation, which covers mod_python setup, includi

Re: MySQL + FastCGI + Dreamhost = Trouble with foreign key in admin

2006-03-01 Thread Colleen Owens
I forgot to say this is with current Django trunk. -- Forwarded message -- From: Colleen Owens Date: Thu, 02 Mar 2006 03:34:08 - Subject: MySQL + FastCGI + Dreamhost = Trouble with foreign key in admin To: "Django users" I'm getting an error when I try to modify a foreign ke

Friend brings a friend.

2006-03-01 Thread Shisha Girl
http://groups.google.com/group/Hookah-Lovers with 336 members within just 9 weeks time, we have developed as a big hookah smokers forum with inside info and great discussion for all things shisha-hookah. How to find a great hookah for u, exotic hookah shisha tobacco from all over the world. Shis

MySQL + FastCGI + Dreamhost = Trouble with foreign key in admin

2006-03-01 Thread Colleen Owens
I'm getting an error when I try to modify a foreign key edited inline in the admin interface using MySQL + FastCGI on a Dreamhost account. I get the same type of error when I try to modify a Poll object (with inline Choices) from the tutorial, so I know it's not my model that's the problem. I've

Re: db_api with a table with multiple relations

2006-03-01 Thread Russell Keith-Magee
On 3/2/06, Glenn Tenney <[EMAIL PROTECTED]> wrote: Do you know if in the M-R version that will also still work?Or will I have to convert it to what I had tried but hadn'tworked?The old style will continue to work in addition to the new style. Yours,Russ Magee --~--~-~--~~~-

Re: Django captcha problems

2006-03-01 Thread Ian Holsman
Hi Syhpoon. the captcha should work fine, (it did the last time I tried it with the TRUNK, i've been focusing on other spots lately) is it complaiing like this when you are fetching the image, or when you are generating the page with the fields, or when you post the data back to it? if you coul

Re: db_api with a table with multiple relations

2006-03-01 Thread Glenn Tenney
On Thu, Mar 02, 2006 at 10:03:52AM +0800, Russell Keith-Magee wrote: > a.reporter_id = r2.id Wow, thanks! As I said, I had tried "... = r2.id" but that didn't work. I never would have thought of "a.reporter_id" since in the code to create it it uses "reporter=...". Do you know if in the M-R ver

Re: db_api with a table with multiple relations

2006-03-01 Thread Russell Keith-Magee
On 3/2/06, Glenn Tenney <[EMAIL PROTECTED]> wrote: a.reporter=r2a.save()# I also tried a.reporter=r2.id with the same resultsWhat is the correct way to change a "ForeignKey" field'srelationship?   What am I missing? a.reporter_id = r2.ida.save()The magic-removal branch also allows a.reporter =

Re: db_api with a table with multiple relations

2006-03-01 Thread Glenn Tenney
On Mon, Feb 27, 2006 at 11:18:48AM -0800, Glenn Tenney wrote: > I knew how to add a record with a many_to_one, but for when I > needed to change that relation afterwards, my testing showed > that just changing the value (e.g. article.reporter=new_r.id) > didn't actually change the relationship --

Re: FCGI Multiple Instances?

2006-03-01 Thread Sandro
Great! I don't know where the confusion came from. So does this mean that every "project" needs its own directory, or do you setup a global django directory and put all of your django projects in that directory? Also, can you setup those apache configs in .htaccess files? Sorry I didn't RTFM..

Re: Database API

2006-03-01 Thread Luke Plant
On Wednesday 01 March 2006 21:54, Paul Smith wrote: > ...to work the same way. Does this shortcut only work because the > ManyToManyField was added to the article model, and not the author > model, or am I doing something wrong? My authors and articles are in > different apps. IIRC, you ha

LazyDate in custom Manipulator

2006-03-01 Thread [EMAIL PROTECTED]
hello list, I am trying to get the fantastic javascript caledars in use for my date fields and found that I need to define them with default=meta.LazyDate() ... sounds good except that I am using a custom manipulator ... is there a way to do something like this, or can someone point me towards so

Re: FCGI Multiple Instances?

2006-03-01 Thread James Bennett
On 3/1/06, Sandro <[EMAIL PROTECTED]> wrote: > I thought mod_python was best for Apache 1.x You may be confusing it with mod_perl, which can't really run under Apache 2 without barfing all over itself. mod_python on Apache 2 runs like a dream. -- "May the forces of evil become confused on the w

Re: Run time lookups

2006-03-01 Thread aaloy
2006/3/1, Jan Rademaker <[EMAIL PROTECTED]>: > > aaloy wrote: > > I'm trying to make a dynamic lookup filter depending on the parameters > > that the user inputs on a web search. > > > > That is, I have three optional search fields and I wan't to be able to > > make a lookup search on my database

Re: FCGI Multiple Instances?

2006-03-01 Thread Sandro
>Any reason why you can't use mod_python? I'm not sure. We're running Apache 2.x One apache server per our domain name and I need these apps to live within our domain. I thought mod_python was best for Apache 1.x --~--~-~--~~~---~--~~ You received this message

Re: Run time lookups

2006-03-01 Thread Jan Rademaker
aaloy wrote: > I'm trying to make a dynamic lookup filter depending on the parameters > that the user inputs on a web search. > > That is, I have three optional search fields and I wan't to be able to > make a lookup search on my database withot having to code all the > search options. Something l

Database API

2006-03-01 Thread Paul Smith
From the Database API docs, I can see that if I have a Many-to-Many relationship between articles and authors, I can do this: article.get_author_list() ...and get a list of article's related authors. If the ManyToManyField was added to the article model, this seems to work.

Re: limiting foreign key choices in a selection field

2006-03-01 Thread sam
Nesh: Your method works. Thanks very much! Now a tougher situation: I want to have the same form to enter "part" information, except the maker field I want to split into two fields: "category" and "maker". I want to show different selections in the "maker" field based on what was selected in th

Re: FCGI Multiple Instances?

2006-03-01 Thread James Bennett
On 3/1/06, Sandro <[EMAIL PROTECTED]> wrote: > I may be posting this question prematurely as I have not yet tried to > implement my own instance of django running on apache or lighttpd but > off-hand it seems that whenever I have a new application to launch, I > am going to have to run a new fcgi

FCGI Multiple Instances?

2006-03-01 Thread Sandro
I may be posting this question prematurely as I have not yet tried to implement my own instance of django running on apache or lighttpd but off-hand it seems that whenever I have a new application to launch, I am going to have to run a new fcgi daemon...is this accurate? I am trying to integrate

Re: Django scalability question

2006-03-01 Thread hsitz
Okay, reading the new transaction docs a little closer it looks like you've implemented method (2) in my message above. Seems to me like this is the necessary method, the only sane thing to do in web context. However, since the transactions apply only in short-lived context of when user is savi

Run time lookups

2006-03-01 Thread aaloy
Hello, I'm trying to make a dynamic lookup filter depending on the parameters that the user inputs on a web search. That is, I have three optional search fields and I wan't to be able to make a lookup search on my database withot having to code all the search options. Something like: search={}

Re: Django captcha problems

2006-03-01 Thread syhpoon
Yes, I do use prefork mpm --~--~-~--~~~---~--~~ 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 [EMAIL

Re: Django Admin

2006-03-01 Thread Steven Armstrong
On 03/01/06 17:26, timster wrote: > I've been using Django mostly just playing around and trying to get the > hang of things before I try anything serious. I'm using Apache and > FCGI, along with the magic-removal branch. > > Last night or the night before, I ran 'svn update' to get the latest >

Re: Django scalability question

2006-03-01 Thread hsitz
Jacob -- I'm a mostly non-web programmer (with experience in non-web n-tier apps) trying to figure out exactly what sort of transaction support this is. Can you clarify for me? Here are the two types of transactions I'm thinking people might want: (1) Transaction is begun when a client makes a

Re: Django scalability question

2006-03-01 Thread Jacob Kaplan-Moss
... And now it's done -- see http://code.djangoproject.com/browser/django/branches/magic-removal/docs/transactions.txt for the docs and http://code.djangoproject.com/changeset/2457 for the code. This should help a lot for high-volume writes, I suspect. Jacob --~--~-~--~~--

Re: How does one access the human readble names given in the model

2006-03-01 Thread timster
I think you may be able to do v.freshness.verbose_name. --~--~-~--~~~---~--~~ 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 th

Re: bug missing first symbol

2006-03-01 Thread Ivan Sagalaev
Ivan Sagalaev wrote: >The slight problem is that this patch is made against trunk code but >adopting it to magic-removal may be just a matter of file name change. > > I've just submitted the patch against magic-removal branch. Enjoy :-) --~--~-~--~~~---~--~~ Yo

Re: order_with_respect_to ???

2006-03-01 Thread bruno desthuilliers
akaihola wrote: >>I must be a bit dumb, but I fail to understand the doc for the >>"order_with_respect_to" META option... Could someone be kind enough to >>have mercy and take time to explain slowly ? > > > I've been wondering about it too, and this is what I've found out: > - used on the "many"

Re: How does one access the human readble names given in the model

2006-03-01 Thread Peter Harkins
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, Mar 01, 2006 at 07:43:47PM +0530, Chetan Vaity wrote: > Now, how can I get the human readble name of the member "freshness" for the > object "v" > I tried exploring v.__class__, v._meta, etc. but no luck. I think v.__class__.__name__ is what

Re: bug missing first symbol

2006-03-01 Thread Ivan Sagalaev
Grigory Fateyev wrote: >I have strange problem. Project has model and DEFAULT_CHARSET = >'utf-8' with LANGUAGE_CODE = ru. After adding in admin some object via >popup window (ForaignKey), main pagr refresh and first symbol of >translated words look like square. Why it can be? > > Most probably

Re: Django in a Load-Balanced environment (ORM issues) ...

2006-03-01 Thread hugo
>They way I would enivsage adding this functionality to Django would be >that in your model you specify, for each Model object (=table), that it >is to be versioned. Versioning would automatically add a '_version' >column to the generated DDL, and the standard Django save() routines >would take ca

Re: Django scalability question

2006-03-01 Thread hugo
>That's good to know, but as you have stated previously, transactions >alone won't solve this problem. There still needs to be some concept of >versioning on top of the transactions, which isn't trivial >(arguably/perhaps even harder to do right than supporting transaction >wrappers). As Adrian w

Django Admin

2006-03-01 Thread timster
I've been using Django mostly just playing around and trying to get the hang of things before I try anything serious. I'm using Apache and FCGI, along with the magic-removal branch. Last night or the night before, I ran 'svn update' to get the latest version. Now when I try to access the built-in

Re: order_with_respect_to ???

2006-03-01 Thread patrick k
- doesn´t work with mysql < 4.1 > >> I must be a bit dumb, but I fail to understand the doc for the >> "order_with_respect_to" META option... Could someone be kind enough to >> have mercy and take time to explain slowly ? > > I've been wondering about it too, and this is what I've found out: >

Re: Django captcha problems

2006-03-01 Thread Jeremy Dunck
On 3/1/06, syhpoon <[EMAIL PROTECTED]> wrote: > > Hi, > I've tried django captcha > (http://feh.holsman.net/articles/2005/12/15/django-captcha-app) but got > strange behaviour: > With internal django web server everything works just fine, but I got a > really misterious error with apache 2.0.55 an

bug missing first symbol

2006-03-01 Thread Grigory Fateyev
Hello, djanglers! I have strange problem. Project has model and DEFAULT_CHARSET = 'utf-8' with LANGUAGE_CODE = ru. After adding in admin some object via popup window (ForaignKey), main pagr refresh and first symbol of translated words look like square. Why it can be? P.S. In attach a cat of scree

Django captcha problems

2006-03-01 Thread syhpoon
Hi, I've tried django captcha (http://feh.holsman.net/articles/2005/12/15/django-captcha-app) but got strange behaviour: With internal django web server everything works just fine, but I got a really misterious error with apache 2.0.55 and mod_python 3.1.4 on FreeBSD (sorry for a lot of quoting, I

Re: Django scalability question

2006-03-01 Thread ZebZiggle
I agree Herb, you need transactions as the basis for making this work. But, as you have stated you need other infrastructure to make the optimistic locking work. Either of the two approaches you mentioned make sense (although there are some issues in using timestamps). Again, Hibernate is a good m

Re: Django scalability question

2006-03-01 Thread Jacob Kaplan-Moss
Actually I'm about the check this in :) I've got a few things to fix before I do, but expect Django to have transaction support by noon. Jacob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gr

Re: Django in a Load-Balanced environment (ORM issues) ...

2006-03-01 Thread ZebZiggle
That sounds like a great suggestion Tim. That's the way I would expect it to work as well. --~--~-~--~~~---~--~~ 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@goog

Re: Django scalability question

2006-03-01 Thread James Bennett
On 3/1/06, Ned Batchelder <[EMAIL PROTECTED]> wrote: > It is too bad that Django doesn't support transactions. If you need > them, then you need them badly, and you should find a framework that > supports them to build your application. Many web applications don't > require them, and Django is g

Re: Django scalability question

2006-03-01 Thread Ned Batchelder
If these things are problems for your application, you need transactions, period. Anything else you cobble together without transactions will merely be a buggy implementation of half of a real transaction system. You'll keep encountering problems until you finally embrace existing transactio

Re: Django scalability question

2006-03-01 Thread hsitz
"Think distributed: two requests updating the same data concurrently. Last write wins. Data might not be what you expect, as you can't make sure that you have the version you directly read before updating. This is the simple scenario. Often this doesn't matter, as "last write wins" is quite accept

Re: order_with_respect_to ???

2006-03-01 Thread akaihola
> I must be a bit dumb, but I fail to understand the doc for the > "order_with_respect_to" META option... Could someone be kind enough to > have mercy and take time to explain slowly ? I've been wondering about it too, and this is what I've found out: - used on the "many" side of relations - adds

Re: Django scalability question

2006-03-01 Thread hsitz
ZebZiggle -- Sorry, if you're not talking about any sort of auto-refresh at all, and are just talking about fact that in Django the second user's object will automatically overwrite the object that the first user just saved in the db, without any warning or error message, then I agree this is a p

Re: Django scalability question

2006-03-01 Thread hsitz
"That's good to know, but as you have stated previously, transactions alone won't solve this problem. There still needs to be some concept of versioning on top of the transactions, which isn't trivial (arguably/perhaps even harder to do right than supporting transaction wrappers). Perhaps we need

Re: Question about inspectdb output

2006-03-01 Thread DavidA
I found the cause of this magic "multiply by 3" but I don't understand it well enough to offer a solution. In the mysql backend, there is this clause (lines 69-70 in DatabaseWrapper.cursor): if self.connection.get_server_info() >= '4.1': cursor.execute("SET NAMES utf8") Setti

How does one access the human readble names given in the model

2006-03-01 Thread Chetan Vaity
Example model:class Vegetable(meta.Model):   name = CharField("Name of the vegetable", maxlength=10)   freshness = PositiveIntegerField("How fresh is it", maxlength=2)With the django API: from django.models.vegetable import *v = vegetables.get_object(pk=1)Now, how can I get the human readble name o

Re: caching questions

2006-03-01 Thread Adrian Holovaty
On 2/28/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > - the admin site is cached too, which makes it a bit hard to use. > it might be a middleware ordering problem, but I haven't found a > working combination. any ideas? Ah, you must be using the per-site cache, right? I'm actually not sure

RE: Django in a Load-Balanced environment (ORM issues) ...

2006-03-01 Thread Leeuw van der, Tim
They way I would enivsage adding this functionality to Django would be that in your model you specify, for each Model object (=table), that it is to be versioned. Versioning would automatically add a '_version' column to the generated DDL, and the standard Django save() routines would take care of

Re: Django scalability question

2006-03-01 Thread Adrian Holovaty
On 3/1/06, Arthur <[EMAIL PROTECTED]> wrote: > The other day I visited Rob Curley in Naples and got a good look at the > tremendous work Rob (and the whole ljworld team) have done with school > sports databases. Individual stats on a thousand players. > > My question is, what happens if I try to u

Re: Django in a Load-Balanced environment (ORM issues) ...

2006-03-01 Thread Adrian Holovaty
On 3/1/06, DavidA <[EMAIL PROTECTED]> wrote: > I just want to echo Peter and Ivan's sentiments on NOT making this > default behavior. Thanks for the feedback (to all of you)! Rest assured this will not be made default behavior. Generally our philosophy in building Django is to activate potentiall

Re: Django scalability question

2006-03-01 Thread Arthur
The other day I visited Rob Curley in Naples and got a good look at the tremendous work Rob (and the whole ljworld team) have done with school sports databases. Individual stats on a thousand players. My question is, what happens if I try to use Django to do the same thing at the New York Daily N

Re: Django in a Load-Balanced environment (ORM issues) ...

2006-03-01 Thread DavidA
I just want to echo Peter and Ivan's sentiments on NOT making this default behavior. What attracted me to Django was a simple, fast, elegant framework for quickly building common types of web applications. I've wandered into the tarpits of J2EE in my past life and I was looking for something at th

Re: Oracle Backend and Free Oracle XE

2006-03-01 Thread ChaosKCW
Sorry forgot link, here it is: http://www.oracle.com/corporate/press/2006_feb/oraclexega-022806.html?msgid=4645616 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Oracle Backend and Free Oracle XE

2006-03-01 Thread ChaosKCW
Hi For anyone working on the Backend for Oracle, There is a free version of oracle now, called Oracle XE. I found one post from last year on this, but cant seem to add to it. I am interested in any progress on this, and could be willing to test any code any has developed. Thanks, C --~--~-

Re: Model Basics

2006-03-01 Thread ChaosKCW
>(On a side note, I could use the ability to have custom >non-Model-Fields (ie, not persisted in the database, only used in the >save() ChangeLog generation) in the Admin, is there an existing way to >do this?) Could you use properties for this? Properties are in the Magic Removal Branch I believ

Re: Form image validating

2006-03-01 Thread syhpoon
Hi, I've tried this django captcha but got strange behaviour: With internal django web server everything works just fine, but I got a really misterious error occurs with apache 2.0.55 and mod_python 3.1.4 on FreeBSD (sorry for a lot of quoting, I'm not really sure what's the call that caused error

order_with_respect_to ???

2006-03-01 Thread bruno desthuilliers
Hi everybody I must be a bit dumb, but I fail to understand the doc for the "order_with_respect_to" META option... Could someone be kind enough to have mercy and take time to explain slowly ? TIA -- bruno desthuilliers développeur [EMAIL PROTECTED] http://www.modulix.com --~--~-~--~---

Re: caching questions

2006-03-01 Thread Malcolm Tredinnick
Hi Fredrik, On Wed, 2006-03-01 at 07:57 +, [EMAIL PROTECTED] wrote: > anyone ? > > > however, there are two things that I haven't been able to sort > > out on my own: > > > > - the admin site is cached too, which makes it a bit hard to use. > > it might be a middleware ordering problem, but

Re: caching questions

2006-03-01 Thread Cheng Zhang
On Mar 1, 2006, at 3:57 PM, [EMAIL PROTECTED] wrote: > > anyone ? I guess guys and gals are busy with PyCon Sprint these couple days, so they couldn't pay much attention on the mailing list. That's unusual. Personally I haven't use cache in a production Django site yet, but I will try to s