Re: Why so slow?

2007-01-12 Thread David Abrahams
"Ramiro Morales" <[EMAIL PROTECTED]> writes: > On 1/5/07, David Abrahams <[EMAIL PROTECTED]> wrote: >> [...] >> >> Most of my content is static in nature, generated on-demand from ReST >> sources. For those pages, the model checks the mod time of a >> directory in the filesystem before deciding

Re: order_by with Foreign Keys

2007-01-12 Thread DavidA
I found this patch which fixes it. I've been using it for a while now: http://code.djangoproject.com/ticket/2210 Honza Král wrote: > this works fine, but if you forget the select_related() it will result > in a cross join which is probably the last thing you want from your > database... > > I

Re: order_by with Foreign Keys

2007-01-12 Thread Honza Král
this works fine, but if you forget the select_related() it will result in a cross join which is probably the last thing you want from your database... I was bitten by this when I specified this sort of ordering in the model... On 1/13/07, gordyt <[EMAIL PROTECTED]> wrote: > > Hi Carole, > >

Re: Creating a "wizard"

2007-01-12 Thread Honza Král
have a look at ticket http://code.djangoproject.com/ticket/3218 it contains a proposed wizard class for newforms - simply subclass it, override the done() method and then instantiate it with a list of newform classes... if you need more functionality (dynamic forms etc.) you will have to

Re: order_by with Foreign Keys

2007-01-12 Thread gordyt
Hi Carole, There is a workaround for this problem. I am using the latest subversion build of django, so I don't know if it works with the last official build or not. Here is an example: ProductVersion.objects.select_related().order_by("kindledb_product.name","version_number") Here are the

Reminder: PyCon early-bird registration ends Monday

2007-01-12 Thread Jacob Kaplan-Moss
Howdy folks -- A quick reminder: Monday 1/15 is the last day for early-bird registration for PyCon (you'll save $65). I'm told that my Django tutorials are nearing capacity, so if you're interested in either of them, you should likely sign up sooner rather than later. See you in Dallas!

Re: Django AMF supports AMF3

2007-01-12 Thread Condredge
I'm having some trouble getting this to work... Do you know if it works with the Development version of Django (which I'm using) or only version 0.95? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Django AMF supports AMF3

2007-01-12 Thread Condredge
Tomohiro, Excellent work on this! Do I need to get the new version if I'm only use AS 2? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: What svn (subversion) client do you use for OS X?

2007-01-12 Thread Noah
have you found svnx to be unstable? --~--~-~--~~~---~--~~ 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

Re: Generic views and filtering

2007-01-12 Thread David Zhou
On Jan 12, 2007, at 6:25 PM, Nicolas Steinmetz wrote: > Do I have to do as James [1] suggests, ie to filter it in views.py > with some generic views methodes ? That's the way I do it. It's a very simple wrapper, and also allows me to add a host of other things into the context. --- David

Generic views and filtering

2007-01-12 Thread Nicolas Steinmetz
Hello, I have a few question with generic views as I can't manage to have all posts related to a tag or category My model is : class Post(models.Model): author = models.ForeignKey(User) title = models.CharField(maxlength=50) summary = models.TextField(blank=True) message =

Re: Dumb question: How to apply patch

2007-01-12 Thread Jeremy Dunck
On 1/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I think I need patch 2070 (file uploads), but have no idea how one goes > about getting and applying a patch. I assume it's from svn, but that's > it. Unfortunately, this ticket http://code.djangoproject.com/ticket/2070 is a mess. You

Dumb question: How to apply patch

2007-01-12 Thread [EMAIL PROTECTED]
I think I need patch 2070 (file uploads), but have no idea how one goes about getting and applying a patch. I assume it's from svn, but that's it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Removing SQL From Templates

2007-01-12 Thread George Davis
> I like having access to the models attributes, such as > get_absolute_url, we use things like this quite a bit in our templates You could relatively painlessly 'flatten' the attributes of the model instances in place before rendering template, i.e. spam.get_absolute_url =

Re: Creating a "wizard"

2007-01-12 Thread gordyt
Howdy Bram, Here is an example of something that I am doing with newforms and sessions and it seems to work very well. In my case I have a search form displayed. Depending upon the options that are selected by the user, when they submit the form it will be handled by one of several different

Re: Sessions without cookies for mobile sites

2007-01-12 Thread Michael Radziej
davo schrieb: > For the record, django/mobile ended up in the 'too difficult' basket > due to the session difficulties, which is a shame because we were > digging it development-wise. I'd love to use it for the next pure web > app though - keep up the good work guys :) There is a thread in

Re: Django's FastCGI init.d script for Linux

2007-01-12 Thread Michael Radziej
Hi, could you put this into the wiki? This type of stuff is a lot of help to new users, but in the mailing list it gets lost. Please note for which type of linux your script is intended, since init scripts for, e.g. debian or SUSE, look quite different. Michael -- noris network AG -

Re: extending user model, but keep getting type error for user.id

2007-01-12 Thread hotani
One more thing: If I do what it says, and send it the user in the form of a class, it will continue, but after running "newprofile.save()", nothing is written to the db table. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Pagination too slow in Admin interface

2007-01-12 Thread nm
I have 301220 records in a simple(3 cols) mysql table and in the Admin interface the pagination is too slow, even with only 10 records per page. There are any reason for this? Curious, is when I click in a visited page is fast. Thanks, Nuno Mariz

Re: Sessions without cookies for mobile sites

2007-01-12 Thread davo
For the record, django/mobile ended up in the 'too difficult' basket due to the session difficulties, which is a shame because we were digging it development-wise. I'd love to use it for the next pure web app though - keep up the good work guys :)

Django's FastCGI init.d script for Linux

2007-01-12 Thread Guillermo Fernandez Castellanos
Hi, For my convenience I've written an init.d script that automatizes the startup of my FastCGI django servers. As it might interest other people, I share it here. Feedback is welcomed. I can put as many sites as I want, and it will automatically assign different port numbers to different

extending user model, but keep getting type error for user.id

2007-01-12 Thread hotani
I'm using the 'one to one' method of creating a user profile which extends django's built-in user model. This is a workaround suggested by James Bennett on his b-list blog, and I think several other people are using this or something similar. My problem is that I have a database I am importing.

Re: close database connection ?

2007-01-12 Thread Jeremy Dunck
On 1/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > I installed Django-0.95, that shouldn't be the problem. Actually, it may be part of the problem. 0.95 is somewhat old (r3491) while trunk is at r4308. (I'm not saying 0.95 is bad, I'm just saying I haven't looked at 0.95 in a long

Re: Creating a "wizard"

2007-01-12 Thread [EMAIL PROTECTED]
Bram, If I recall, there have been some discussions about building this sort of capability in new forms. However, you can see how I've done something similar in Satchmo using the old forms implementation. It's not automatic, but it does allow someone to move through all three steps and the

Re: Can a view open a page in a new browser window?

2007-01-12 Thread Bob T.
Thanks Julio and Jeremy. When the users generate multiple reports I go to a page that shows links to the reports and let them click the link for the report they want to see. However, when there is only one HTML report to view it would be one less click for the user if I could bypass that page and

Uploading large files via http FORM

2007-01-12 Thread Pythoni
Hi, does anyone have an experience with uploading large files in Django application? I use mod_python with Django and when I try to upload a file about 100 MB I received an error. Thank you for any suggestion. L. --~--~-~--~~~---~--~~ You received this message

sqlite3, QuerySet.extra() and order_by() inconsistencies between Python versions

2007-01-12 Thread Bo Shi
Hi - Has anyone else observed differences between the behavior of order_by between Python 2.3 and 2.4? Under 2.3, the following code drops many items in thread_list when using order_by(): ... extra_last_updated = """ SELECT date FROM forum_post WHERE

Re: close database connection ?

2007-01-12 Thread [EMAIL PROTECTED]
I installed Django-0.95, that shouldn't be the problem. after i get data from the database first there are some actions in python but the DB is called afterwards. So it could be that there is a second connection open when the other is still closing. is there a way to test if the connection

Re: date format other than YYYY-MM-DD

2007-01-12 Thread Adrian Holovaty
On 1/12/07, Andres Luga <[EMAIL PROTECTED]> wrote: > Any idea if newforms simplifies this? Yes, newforms DateFields let you specify the input format(s). This has yet to be integrated into the Django admin, but it will be sooner rather than later. Adrian -- Adrian Holovaty holovaty.com |

Creating a "wizard"

2007-01-12 Thread Bram
Hi all, I started working with Django some time ago, and i've to say that I like the framework so far. However, now I would like to create a kind of wizard for an ordering system. In short, a process with back/next/cancel buttons. It would be nice to save everything in the session or some other

Re: What svn (subversion) client do you use for OS X?

2007-01-12 Thread Rob Hudson
If you visit their "Documents & Files" section you can see there have been some updates as recent as December 2006. But they sound experimental. But it looks like progress is being made... Noah wrote: > I could hope there is a rewrite... after all there hasn't been a news > update since

Re: What is the best way of uploading large files from Django?

2007-01-12 Thread Pythoni
Istvan, Thank you for your reply. I know about tramline but I was not able to use tramline together with Django. Do you use tramline by yourself? La. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Newforms 'preferred practice'

2007-01-12 Thread Felix Ingram
Hi Chris, On 12/01/07, Chris Rose <[EMAIL PROTECTED]> wrote: > Felix Ingram wrote: > > 3. Binding data - I'd like the form to handle editing of an instance. > > I could construct a dictionary of values and pass it to the form as > > per the docs but I'd like to just pass a model instance and

Re: Newforms 'preferred practice'

2007-01-12 Thread Felix Ingram
Hi Honza, On 12/01/07, Honza Král <[EMAIL PROTECTED]> wrote: > On 1/12/07, Felix Ingram <[EMAIL PROTECTED]> wrote: > > > > Hello all, > > > > I've been playing around with the newforms library and I'd like to > > check that I'm on the right track. > > > > I've got a fairly complicated model that

Re: Newforms 'preferred practice'

2007-01-12 Thread Chris Rose
Felix Ingram wrote: > 3. Binding data - I'd like the form to handle editing of an instance. > I could construct a dictionary of values and pass it to the form as > per the docs but I'd like to just pass a model instance and have the > form sort things out. Is this advisable? If so then does

Re: Newforms 'preferred practice'

2007-01-12 Thread Honza Král
On 1/12/07, Felix Ingram <[EMAIL PROTECTED]> wrote: > > Hello all, > > I've been playing around with the newforms library and I'd like to > check that I'm on the right track. > > I've got a fairly complicated model that has a few foreign keys and > m2m fields. One of the m2m fields references a

Multi-db question

2007-01-12 Thread dutche
Does anybody knows where can I find some docs about multi-db ?? Thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Newforms 'preferred practice'

2007-01-12 Thread Felix Ingram
Hello all, I've been playing around with the newforms library and I'd like to check that I'm on the right track. I've got a fairly complicated model that has a few foreign keys and m2m fields. One of the m2m fields references a table with ~130,000 rows so the usual select boxes aren't that

Re: Web services in Django

2007-01-12 Thread David Larlet
2006/12/22, juampa <[EMAIL PROTECTED]>: > > Hello all: > > I am trying to gather all the information I can about implementing web > services with Django (XML-RPC, SOAP, REST). Can you suggest good > sources of information/examples of implementations? What is the offical > status of WS support in

Re: Django Projects and Subversion

2007-01-12 Thread Jeffrey Zelt
I am just finishing a Django project that is managed by Subversion. I have set up 3 web sites to manage it - a "development", "staging" and "production" server. This is a common paradigm, nothing that I came up with myself. You can have active committing by developers to the repository and

What is the best way of uploading large files from Django?

2007-01-12 Thread Pythoni
I use Django with mod_python and it works great. But when I try to upload large file ( 90 MB)via HTTP FORM I received an error. Can anyone suggest a way how to upload such file?I was thinking about FTP protocol but it is difficult because a user who uploads the file would have to use FTP client

Re: Latex Rendering

2007-01-12 Thread Kjell Magne Fauske
Anush Shetty wrote: > Hi, > I want to build a wiki with the html text to be rendered as latex. Can > anybody please suggest me on how I should go about it. > Docutils[1] can generate LaTeX code[2] from reStructuredText markup. Since its implemented in Python, it should not be that difficult to

Re: Latex Rendering

2007-01-12 Thread Kenneth Gonsalves
On 12-Jan-07, at 1:48 PM, Anush Shetty wrote: > I want to build a wiki with the html text to be rendered as latex. > Can anybody please suggest me on how I should go about it. rendered where? Use markdown or somesuch for formatting the wiki and use the steps somewhat like those described

Re: date format other than YYYY-MM-DD

2007-01-12 Thread Andres Luga
Hi, Any idea if newforms simplifies this? Regards, Andres On 9/29/06, DavidA <[EMAIL PROTECTED]> wrote: > I also ran into this problem so I did it that hard way: I created a > custom model DateField and a custom form DateField. (I call them > RelaxedModelDateField and RelaxedFormDateField

Latex Rendering

2007-01-12 Thread Anush Shetty
Hi, I want to build a wiki with the html text to be rendered as latex. Can anybody please suggest me on how I should go about it. -- Cheers. Anush Shetty --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django