allow simple_tag to set context?

2006-08-28 Thread Slowness Chen
simple_tag and inclusion_tag make writing simple template tags much more convenient. As the document says, "Another common type of template tag is the type that displays some data by rendering another template", e.g. {% for choice in choices %} {{ choice }} {% endfor %} But if there a

Re: Too Much Custom SQL

2006-08-28 Thread bradford
Yes, GROUP BY and aggregate functions were at the top of that list. Others include complex joins, UPDATE FROM, temporary tables (not that often), sequences, and more (but those are the most common), especially stuff that is specific for just postgresql (the database that I happen to be using). An

Re: 3 patches I've added

2006-08-28 Thread [EMAIL PROTECTED]
Tom Tobin wrote: > From my own experience watching Django's timeline, the core developers > tend to go on "rampages" every so often and address many tickets at > once; if you submitted these tickets recently, there's a good chance > they'll get some love next time that happens. :-) Here's to th

Re: Too Much Custom SQL

2006-08-28 Thread [EMAIL PROTECTED]
Out of interest, what types of things are you having trouble with in Django? I know there's a lack of support for aggregate functions and GROUP BY's etc Aggregate functions could be easily patched in ( e.g. [1], [2] ), but I believe this is waiting for query.py to be refactored. [1] http://code.

Too Much Custom SQL

2006-08-28 Thread bradford
Hi, it seems like I'm constantly writing custom SQL code for everything because the django ORM cannot handle a lot of my requirements (which is perfectly understandable). Would it be such a bad idea to add an api to the django orm that's similar to SQLAlchemy? I don't like having to create curso

Re: db_index not creating indexes with syncdb

2006-08-28 Thread Rob Hudson
Russell Keith-Magee wrote: > You are correct (and it's not just with MySQL). This is a bug born of > the way that syncdb installs applications. For some reason, it doesn't > defer to install - it duplicates the install logic, but doesn't include > indexes. > > I intend to refactor this code wh

Re: On MEDIA_URL

2006-08-28 Thread Malcolm Tredinnick
On Mon, 2006-08-28 at 13:55 -0700, [EMAIL PROTECTED] wrote: [...] > MEDIA_URL and MEDIA_ROOT still confuse me. For a FileField you are > required to specify the "upload_to" path. Do you specify > upload_to=settings.MEDIA_ROOT and use MEDIA_URL in the get_absolute_url > method? The upload_to set

Re: On MEDIA_URL

2006-08-28 Thread [EMAIL PROTECTED]
> I think you are arriving at an understanding of why universally exposing > MEDIA_URL is not always the right thing. Yes. My big assumption was that it was intended for static media only. Which I think a lot of new Django users make based on the name of the setting. MEDIA_URL and MEDIA_ROOT s

Re: Support for Native XML Database (NXD)

2006-08-28 Thread GinTon
[EMAIL PROTECTED] wrote: > GinTon wrote: > > > I think that would be a big step if we could implement a NXD in Django, > > but I don't speak of substitute a RDBMS by NXD else of using NXD when > > it was really necessary. > > I think you'd first have to go 'up' a layer, and define an API onto >

Re: [patch] URLField says all links to Wikipedia are invalid

2006-08-28 Thread Adrian Holovaty
On 8/27/06, Ian Holsman <[EMAIL PROTECTED]> wrote: > I would be +1 on this if it included the site domain in the user-agent. > having it this way will just cause wikipedia to block it when a > single badly behaving django-bot uses it. Great idea, Ian. I agree that this patch should use the site d

Re: Django and psycopg2 problems

2006-08-28 Thread Jacob Kaplan-Moss
On Aug 28, 2006, at 2:50 PM, Adrian Holovaty wrote: > On 8/28/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: >> Are the any objections to changing the psycopg2 backend to behave the >> same was as the other ones (knowing that it's actually a step >> backwards)? Eventually the right thing to do

Re: Django and psycopg2 problems

2006-08-28 Thread Adrian Holovaty
On 8/28/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > Are the any objections to changing the psycopg2 backend to behave the > same was as the other ones (knowing that it's actually a step > backwards)? Eventually the right thing to do would be to make the > *other* backends behave this way,

Django and psycopg2 problems

2006-08-28 Thread Jacob Kaplan-Moss
Howdy folks -- So it appears that the Django psycopg2 has a few issues that make it operate differently than any other of the db backends. There's a paste of the django test suite output at http://django.pastebin.com/ 778189 which shows 6 failures, but actually there's only two things wro

Re: On MEDIA_URL

2006-08-28 Thread Malcolm Tredinnick
On Mon, 2006-08-28 at 11:58 -0700, [EMAIL PROTECTED] wrote: [...] > In that case, where would I put my media setting so I could refer to it > from the templates? Make up my own setting in settings.py and write a > context processor to make it available to the templates? If it was something that

Re: On MEDIA_URL

2006-08-28 Thread [EMAIL PROTECTED]
Malcolm Tredinnick wrote: > Yes. Exactly. Or use one that somebody else wrote and posted to the Wiki > or made available elsewhere. We just don't want to put a "retrieve > settings" processor in core because we are making a judgement call about > the security and usability implications (if it's in

Re: On MEDIA_URL

2006-08-28 Thread Malcolm Tredinnick
On Mon, 2006-08-28 at 11:27 -0700, [EMAIL PROTECTED] wrote: > I posted a reply to a wontfix bug and thought I'd also post it here for > discussion. > See bug: http://code.djangoproject.com/ticket/2532 > > Here's the copy/paste of my argument: > > I agree that this should be there by default. I c

Re: Row level permission problem in admin for inline edited objects

2006-08-28 Thread Chris Long
Hi, With the select list, I am hoping for some general public opinion on how to handle this. If the user does not have change permissions on this, does this mean they can not see the object in the select list? I'm not sure if that would be a workable solution. A proposal: Create an additional "

On MEDIA_URL

2006-08-28 Thread [EMAIL PROTECTED]
I posted a reply to a wontfix bug and thought I'd also post it here for discussion. See bug: http://code.djangoproject.com/ticket/2532 Here's the copy/paste of my argument: I agree that this should be there by default. I can understand the slippery slope argument, but this makes sense. Other set

Re: 3 patches I've added

2006-08-28 Thread Tom Tobin
On 8/28/06, Joel Heenan <[EMAIL PROTECTED]> wrote: > > I have noticed there is a great number of patches like mine that don't > ever seem to be reviewed and all seemed to be assigned to Adrian but > he seems to be concentrating on new features at the moment. As someone > who wants to contribute to

Re: [patch] URLField says all links to Wikipedia are invalid

2006-08-28 Thread Tom Tobin
On 8/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Akismet thinks this bug is spam, so I cannot submit it to Trac. If you're being locked out due to the spamfilter (and this goes for anyone else), please email me with your IP (or IP range) or, if you have a wide dynamic IP range, the long

Re: URLField says all links to Wikipedia are invalid

2006-08-28 Thread Will McCutchen
Ian Holsman wrote: > I would be +1 on this if it included the site domain in the user-agent. > having it this way will just cause wikipedia to block it when a > single badly behaving django-bot uses it. +1 on including the domain in the User Agent... good idea. --~--~-~--~~-

Re: [Fw]The Python Web Framework

2006-08-28 Thread Joel Heenan
On 8/23/06, James Bennett <[EMAIL PROTECTED]> wrote: > > * The template system being "dumbed down" for designers? Going to call > BS on that too. The real complaint here seems to be that the template > system doesn't include a programming language, and personally I don't > think it should. If ther

Q

2006-08-28 Thread Joe
Ian Holsman wrote: > all of these types of things should get as much info as possible out > of the database/models that exist > having to retype the relationships sounds yuko to me. > > but hey... I'm not a ruby guy.. maybe they like doing these kind of > things. This is a limitation of support

3 patches I've added

2006-08-28 Thread Joel Heenan
Django dev, Not trying to bypass normal process but I would appreciate some feedback on the following 3 patches I've submitted recently: This one adds a button to edit the current object to the admin interface: http://code.djangoproject.com/ticket/2569 This is a fix for a bug with inline editin

Re: Django Test framework commits (r3658-r3661)

2006-08-28 Thread [EMAIL PROTECTED]
Hi Russ, Nice work! FYI I submitted a patch (#2490 [1] ) a while ago to get runtests.py to produce an error if no DJANGO_SETTINGS_MODULE is in the env. Not sure if this is something you want, but I've updated it to work post r3661 - it does make it a little bit easier to work out how to run the