Re: Problem and fix with ado_mssql

2006-02-28 Thread kent
The only problem with pymssql from my POV is that it is GPL; adodbapi is LGPL which is more liberal and closer to Django's license. I looked at ticket 1258, it looks like much of that work would apply to adodbapi as well. Certainly some of the failing adodbapi tests would be fixed by the same chan

Re: Django scalability question

2006-02-28 Thread ZebZiggle
Sorry, but I don't think Django will work in anything but a single user environment, or multi-users only doing read-only access. Unless someone from the Django team can clarify. Please read my thread on this issue ... it's a big concern for me. http://groups.google.com/group/django-users/browse_f

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

2006-02-28 Thread ZebZiggle
Here is a blog article about what core functionality an ORM should support: http://pythonnotes.blogspot.com/2004/09/python-orm-tools.html Specifically, take note of the paragraph that reads: To implement true object persistence, each object needs a unique identifier. Each ORM will use a differe

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

2006-02-28 Thread Ijonas Kisselbach
First of all, I'm not a Django Dev Team member, but have used ORM technology for years.Singleton objects within an OM context do no scale across multiple machines/VMs. Its pipe dream material. I've saw a demo of this kind of stuff from an OODB vendor in the late nineties and it was impressive, but

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

2006-02-28 Thread hugo
>The specific problem I'm facing is model ORM objects going "stale" (the >in-memory representation is different than the database due to a change >from another machine/thread). Typically ORM layers deal with this by >supporting some form of Versioning on the records so the ORM can >freshen the cac

Re: Django scalability question

2006-02-28 Thread Jacob Kaplan-Moss
On Feb 28, 2006, at 7:49 AM, ZebZiggle wrote: > Sorry, but I don't think Django will work in anything but a single user > environment, or multi-users only doing read-only access. Unless someone > from the Django team can clarify. I'd be glad to: I have three web servers hitting the same database

Re: code mod to get raw admin template output

2006-02-28 Thread Adrian Holovaty
On 2/24/06, hsitz <[EMAIL PROTECTED]> wrote: > Back in middle of last year Adrian Holovaty posted some very helpful > information on how to get the raw output of admin templates for use as > basis for your own views. I'm a newbie trying to get my head around > Django, and it seems the code has be

Re: Django scalability question

2006-02-28 Thread James Bennett
On 2/28/06, ZebZiggle <[EMAIL PROTECTED]> wrote: > Sorry, but I don't think Django will work in anything but a single user > environment, or multi-users only doing read-only access. Unless someone > from the Django team can clarify. Please read my thread on this issue > ... it's a big concern for

limiting foreign key choices in a selection field

2006-02-28 Thread sam
I have a model such as: class Part: maker = ForeignKey(Maker) .. When I make a form to enter the "part" information, if I user standard AddManipulator, maker will become a selection list of all possible makers. What if I only want to show a sub-list of makers that belong to a specifi

Re: Django scalability question

2006-02-28 Thread hugo
>Of *course* you'd expect that obj2.data != obj1.data -- Django's not >going to be able to hide the fact that you're using a database from you >(nor should it). Think distributed: two requests updating the same data concurrently. Last write wins. Data might not be what you expect, as you can't ma

Re: limiting foreign key choices in a selection field

2006-02-28 Thread Nebojša Đorđević
sam wrote: > I have a model such as: > > class Part: > maker = ForeignKey(Maker) > .. > > When I make a form to enter the "part" information, if I user standard > AddManipulator, maker will become a selection list of all possible > makers. What if I only want to show a sub-list of ma

Re: Django scalability question

2006-02-28 Thread ZebZiggle
Hugo/Georg is exactly correct. I'm sure there are many very large websites using Django, but from what I see many are newspaper-style (many reads, few if any writes except by the admins). I'd be curious how may sites are doing dynamic updates by many concurrent users? In a read-only / content / p

Re: Model Basics

2006-02-28 Thread DaveW
I see that ticket #1268 has been closed as WontFix - threadlocal is felt to be to heavyweight a solution. Unfortunately, some mechanism for this is going to be needed for Django to be used in many corporate environments - has anyone had any other thoughts about how to implement this? --~--~-

Re: limiting foreign key choices in a selection field

2006-02-28 Thread sam
My problem is the "category" is determined at run-time, not at module definition time. How to do that? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

caching questions

2006-02-28 Thread [EMAIL PROTECTED]
I've been running with memcached caching for a couple of days, and it works like a charm (450+ hits per second on a cheap-ass server isn't all that bad ;-). 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

Re: Model Basics

2006-02-28 Thread Ned Batchelder
Jacob, could you explain why threading.local is heavyweight? On what platforms is the pure Python implementation used? Windows at least uses the C implementation. DaveW: Couldn't you implement this thread local yourself with a very simple middleware component? --Ned. DaveW wrote: > I see t

Re: Model Basics

2006-02-28 Thread Adrian Holovaty
On 2/28/06, DaveW <[EMAIL PROTECTED]> wrote: > I see that ticket #1268 has been closed as WontFix - threadlocal is > felt to be to heavyweight a solution. Unfortunately, some mechanism for > this is going to be needed for Django to be used in many corporate > environments - has anyone had any othe

Re: limiting foreign key choices in a selection field

2006-02-28 Thread Nebojša Đorđević
sam wrote: > My problem is the "category" is determined at run-time, not at module > definition time. How to do that? Thanks. I'm missed 'When I make a form to enter the "part" information' part :) From: http://www.djangoproject.com/documentation/forms/ something like this (untested): class Co

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

2006-02-28 Thread ZebZiggle
Thx for the feedback guys. I agree that this problem is pretty fundamental. I don't know what worries me more, the fact that the problem exists or the architects don't see the problem. I think in my case I can isolate the offending code and use some form of "double-buffering" technique to solve

Re: Model Basics

2006-02-28 Thread Max Battcher
On 2/28/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > Yeah, we talked about this on Sunday at the Django sprint. The > tentative plan is to introduce a CurrentUserField which is > special-cased in the admin logic. How would this be handled in user code? How would Manipulators deal with these,

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

2006-02-28 Thread Max Battcher
On 2/28/06, ZebZiggle <[EMAIL PROTECTED]> wrote: > I agree that this problem is pretty fundamental. I don't know what > worries me more, the fact that the problem exists or the architects > don't see the problem. I wouldn't put it that. It is a problem and things like transaction support do show

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

2006-02-28 Thread Adrian Holovaty
On 2/28/06, ZebZiggle <[EMAIL PROTECTED]> wrote: > I agree that this problem is pretty fundamental. I don't know what > worries me more, the fact that the problem exists or the architects > don't see the problem. > > I think in my case I can isolate the offending code and use some form > of "doubl

Re: Django scalability question

2006-02-28 Thread Ivan Sagalaev
ZebZiggle wrote: >I'm sure there are many very large websites using Django, but from what >I see many are newspaper-style (many reads, few if any writes except by >the admins). I'd be curious how may sites are doing dynamic updates by >many concurrent users? > It's still not a problem for a typic

Re: Django scalability question

2006-02-28 Thread ZebZiggle
Hmm, I don't think you could get a cycle short enough to avoid the race conditions described above. I agree that keeping objects in memory will not help the problem (as per my original post), but constantly freshening the object won't work either. Perhaps single-user is a an unqualified overstate

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

2006-02-28 Thread ZebZiggle
Hey guys ... that's fantastic ... just the sort of response I was hoping to see from the start of this conversation. Like they say in AA "the first step is admitting you have a problem" ;-) I will definitely explore all those options and make my contributions to the project. All the best, Zeb

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

2006-02-28 Thread Peter Harkins
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tue, Feb 28, 2006 at 02:36:41PM -0600, Adrian Holovaty wrote: > With that said, I think it would be a fantastic improvement to > Django's database layer. You could solve it in the interim by creating > a "status" field on your model, override save(

Re: Django scalability question

2006-02-28 Thread hugo
>That said, it is nice to see someone admit that this is a problem. :-) Actually _that_ was never the problem: the ticket on transactions (whose absence is the actual culprit in this problem area) is ticket #9 :-) bye, Georg --~--~-~--~~~---~--~~ You received th

FileField in Admin

2006-02-28 Thread MartinG
I have installed Django on two WinXP machines and created similar test applications on both. The model for the application "notes" contains the class "Note", and the class "Attachment", as shown below: class Note(meta.Model): note_text = meta.TextField('text') class META: admin =

Re: Problem and fix with ado_mssql

2006-02-28 Thread Jeremy Dunck
On 2/28/06, kent <[EMAIL PROTECTED]> wrote: > > The only problem with pymssql from my POV is that it is GPL; adodbapi > is LGPL which is more liberal and closer to Django's license. I looked > at ticket 1258, it looks like much of that work would apply to adodbapi > as well. Certainly some of the

Re: manage.py vs. django-admin.py

2006-02-28 Thread tomass
Thanks, that seemed to do 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 unsubscribe from this group, send email to [E

Re: Django scalability question

2006-02-28 Thread ZebZiggle
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

date time errors: please explain?

2006-02-28 Thread gizo
Hoody. Can anyone tell me why I can use this code with MySQLdb in python, but not in Django? cursor=db.cursor() cursor.execute("select date_add('2006-2-24',INTERVAL 1 Month) as newDate") django error is: ValueError, unpack list of wrong size I am completely stumped. Alternately, is there

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

2006-02-28 Thread Ivan Sagalaev
Peter Harkins wrote: >I can see why folks would want this, but I'd like to toss in a vote >against it being on by default. > I just started to write the same thing :-) > It strikes me as spooky action at a >distance -- because another process possibly on another machine saved >the state of one o

Re: date time errors: please explain?

2006-02-28 Thread tonemcd
I'm pretty sure that fields defined as DateTimeField in your model are converted to python datetime objects when read from the database. That means you can use all the datetime methods on it, like datetime.timedelta for example. Check out http://groups.google.com/group/django-users/browse_frm/th

Re: caching questions

2006-02-28 Thread [EMAIL PROTECTED]
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 I haven't found a > working combination. any ideas? > > - I would like to explicitly re