Re: Restricting q QuerySet based on ManyToManyField

2007-01-29 Thread Ramashish Baranwal
> Ram- > > I believe that > > User.objects.filter(related__name__starts_with='A') > > would get you what you're looking for, per the example at > starting > with block "# We can perform kwarg queries across m2m relationships". Tha

Re: memcached backed

2007-01-29 Thread Isaac Sparrow
I think Mark is referring to the actual 'replace' functionality of memcached. From http://www.danga.com/memcached/ replace -- sets in the cache only if the key already exists As opposed to: set -- unconditionally sets a given key with a given value Isaac On 1/29/07, Jacob Kaplan-Moss <[EMAIL

Re: New Vim files for Django

2007-01-29 Thread Honza Král
On 1/28/07, Dave Hodder <[EMAIL PROTECTED]> wrote: > > Hello, > > Updated syntax files for the Vim editor are available here: > > http://www.vim.org/scripts/script.php?script_id=1487 > > Improvements include: > >* Support for the new comment syntax, e.g. {# greeting #}. > >* Better err

Re: Generic Views - problem with template missing

2007-01-29 Thread Honza Král
On 1/27/07, Panos Laganakos <[EMAIL PROTECTED]> wrote: > > I've added the allow_future option, and indeed it worked. Thanks alot! > > Though, not sure what "in the future" means. a matter of the date not > being the same in the db and the server or something? Care to explain? the thing is that in

Re: Help with Last Seen (why doesn't this work???)

2007-01-29 Thread Don Arbow
On 1/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > C'mon guys... anyone? I used to be a member of the Mac user group here in Seattle. Every Saturday morning, they hold a "Cafe" where users can get together for coffee and doughnuts, talk about Macs and people can bring in their mach

Re: Help with Last Seen (why doesn't this work???)

2007-01-29 Thread Joseph Heck
Not to mention that I think someone posted some code to this list, just not in response to your particular thread. Look back in the past week for something about a custom middleware that did the trick. -joe On 1/29/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > > On 1/29/07, [EMAIL PROTECTED]

Re: request.META.PATH_INFO strangeness...

2007-01-29 Thread Graham Dumpleton
On Jan 30, 6:42 am, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > hello everyone, > > Short question! > > If I go tohttp://my.server.com/hello/this/is/my/path/ > > and request.META.PATH_INFO is set to "/path" not to > "/hello/this/is/my/path/" > > Runningmod_python/ apache. In the dev-ser

Re: Help with Last Seen (why doesn't this work???)

2007-01-29 Thread Adrian Holovaty
On 1/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > C'mon guys... anyone? Hey there, Please don't "bump" your threads like this -- it's unacceptable mailing-list behavior. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com --~--~-~--~~~---~--~~

Re: Help with Last Seen (why doesn't this work???)

2007-01-29 Thread [EMAIL PROTECTED]
C'mon guys... anyone? On Jan 29, 7:19 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Anyone? > > I know this is a common question... I've seen it come up more than > once (frankly, I've asked more than once). And I know that some people > have alluded to having an answer. I know having som

Re: Newforms and generic views

2007-01-29 Thread Mike
Hey Jacob, Thanks for your pointer regarding error highlighting--Igotsit. > Actually, though, there hasn't been anyone who's (so far) volunteered to work > on bring newforms into generic views. So, if that's something you'd like to > work on, we'd all love it if you jump on over to django-dev an

Re: Newforms and generic views

2007-01-29 Thread Mike
On Jan 29, 4:57 pm, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > On 1/29/07 3:28 PM, Mike wrote: > > > Can anyone share information regarding the current timeline and plans > > for newforms and integrating newforms with generic views?Generally we don't > > really put out "timelines" per-se. >

Re: Template Not Displaying INPUT FIELD

2007-01-29 Thread johnny
Thank you. It worked. john On Jan 29, 2:58 pm, "Collin Grady" <[EMAIL PROTECTED]> wrote: > DateTimeFields have two inputs, not one. You need to use > {{ form.start_at_date }} and {{ form.start_at_time }} > > In addition, you cannot use the date or time filters on a form field. > > On Jan 28, 3:

Re: getElementsByClass

2007-01-29 Thread Vance Dubberly
DISREGARD. WRONG LIST!! SORRY. On 1/29/07, Vance Dubberly <[EMAIL PROTECTED]> wrote: > > Just checking if I'm delusional or whether dojo.html.getElementByClass is > broken in IE 7. > > dojo.debug("pre getElementByClass") > tabs = dojo.html.getElementByClass('tab', 'tabs', 'div'); > dojo.debug("po

getElementsByClass

2007-01-29 Thread Vance Dubberly
Just checking if I'm delusional or whether dojo.html.getElementByClass is broken in IE 7. dojo.debug("pre getElementByClass") tabs = dojo.html.getElementByClass('tab', 'tabs', 'div'); dojo.debug("post getElementByClass") on a chunk o' code that looks like this blah blah results in DEBUG:

Re: request.META.PATH_INFO strangeness...

2007-01-29 Thread Bram - Smartelectronix
James Bennett wrote: > On 1/29/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: >> oh, sorry 'bout that! =) >> >> cent-os running: >> >> * apache2 2.0.52 >> * mod_python 3.2.10 >> * python 2.5 >> * postgres 8.1.4 >> * psycopg 1.1.21 > > That still doesn't really help. We need the configurati

Re: Newforms and generic views

2007-01-29 Thread Jacob Kaplan-Moss
On 1/29/07 3:57 PM, Jacob Kaplan-Moss wrote: > actually get paid full-time to work on Django[*], this is how it'll be. Dammit, I was gonna make a snarky joke about someone loaning me a million dollars for a Django endowment, and then I went and clicked "send" to early. /me grumbles... Jacob -

Re: Newforms and generic views

2007-01-29 Thread Jacob Kaplan-Moss
On 1/29/07 3:28 PM, Mike wrote: > Can anyone share information regarding the current timeline and plans > for newforms and integrating newforms with generic views? Generally we don't really put out "timelines" per-se. You see, we're all volunteers around here, and committing to a solid timelin

Re: request.META.PATH_INFO strangeness...

2007-01-29 Thread James Bennett
On 1/29/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > oh, sorry 'bout that! =) > > cent-os running: > > * apache2 2.0.52 > * mod_python 3.2.10 > * python 2.5 > * postgres 8.1.4 > * psycopg 1.1.21 That still doesn't really help. We need the configuration data from the httpd.conf file you

Re: customizing how the slug fields are populated

2007-01-29 Thread omat * gezgin.com
Thanks... I thought it should be somewhere on the server side. I see that it is preferred to give users an option to manipulate slugs manually via an admin interface, that's why it is kept on the client side. If I prefer to do it on the server side I wouldn't need prepopulate_from parameter.

Re: request.META.PATH_INFO strangeness...

2007-01-29 Thread Bram - Smartelectronix
James Bennett wrote: > On 1/29/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: >> Collin Grady wrote: >>> It would be helpful if you provide more info - how are you passing the >>> requests to django, for instance? >> I'm passing them in a context processor which is: > > I think he was aski

Newforms and generic views

2007-01-29 Thread Mike
Hi folks, Can anyone share information regarding the current timeline and plans for newforms and integrating newforms with generic views? I did look over the website and searched the archives of the dev group but didn't see a recent estimate. I'd gladly help out, but I'm somewhat new to Djang

Re: request.META.PATH_INFO strangeness...

2007-01-29 Thread James Bennett
On 1/29/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > Collin Grady wrote: > > It would be helpful if you provide more info - how are you passing the > > requests to django, for instance? > > I'm passing them in a context processor which is: I think he was asking more about the web serve

Re: request.META.PATH_INFO strangeness...

2007-01-29 Thread Bram - Smartelectronix
Collin Grady wrote: > It would be helpful if you provide more info - how are you passing the > requests to django, for instance? I'm passing them in a context processor which is: -- from django.conf import settings def media_url_and_request(request): return {'media_url': set

Re: Multilingual content - yet another idea

2007-01-29 Thread [EMAIL PROTECTED]
Replying to myself again: On 28 Sty, 23:50, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > I have trouble in admin list view. Fields under translation has > > incorrect column header in list.you are right, there is a problem with > > column headers. > > Unfortunately there is no way around

file names for db file fields

2007-01-29 Thread shaunc
There are two methods in the db api specific to files: get_FOO_filename( ) and save_FOO_file( fn, rawcontents). If we just want to treat the associated file as an anonymous "blob", can we say: mod.save_FOO_file( mod.get_FOO_filename(), rawcontents ) Or do we need to provide a filename on f

Re: Admin page -Loging in problems

2007-01-29 Thread voltron
Yes I did add the admin app, all models validated properly and I can start the internal Django server On Jan 29, 5:04 am, "Ramdas S" <[EMAIL PROTECTED]> wrote: > You have obviously not done something right with settings.py. > > Have you included 'dajngo.contrib.admin' in the installed apps secti

Re: Admin page -Loging in problems

2007-01-29 Thread voltron
Yes I have Ramdas, thast why I cant pull up the admin page, any other ideas? Thanks On Jan 29, 5:04 am, "Ramdas S" <[EMAIL PROTECTED]> wrote: > You have obviously not done something right with settings.py. > > Have you included 'dajngo.contrib.admin' in the installed apps section of > settings.p

Re: Template Not Displaying INPUT FIELD

2007-01-29 Thread Collin Grady
DateTimeFields have two inputs, not one. You need to use {{ form.start_at_date }} and {{ form.start_at_time }} In addition, you cannot use the date or time filters on a form field. On Jan 28, 3:16 pm, "johnny" <[EMAIL PROTECTED]> wrote: > In my template, I am not getting a input field for start

Re: request.META.PATH_INFO strangeness...

2007-01-29 Thread Collin Grady
It would be helpful if you provide more info - how are you passing the requests to django, for instance? On Jan 29, 11:42 am, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > hello everyone, > > Short question! > > If I go tohttp://my.server.com/hello/this/is/my/path/ > > and request.META.PA

request.META.PATH_INFO strangeness...

2007-01-29 Thread Bram - Smartelectronix
hello everyone, Short question! If I go to http://my.server.com/hello/this/is/my/path/ and request.META.PATH_INFO is set to "/path" not to "/hello/this/is/my/path/" Running mod_python / apache. In the dev-server it obviously ( ;-) ) works just fine... Any clues? Thanks a lot, - bram

Re: Admin page -Loging in problems

2007-01-29 Thread voltron
Any ideas? I`m really stuck On Jan 29, 5:04 am, "Ramdas S" <[EMAIL PROTECTED]> wrote: > You have obviously not done something right with settings.py. > > Have you included 'dajngo.contrib.admin' in the installed apps section of > settings.py. Please check > > Ramdas > On 1/29/07, voltron <[EMAIL

search_fields problem

2007-01-29 Thread sansmojo
I built a very simple recipe thingy for my mom last night, with the recipe model shown below. The problem is that if I include recipe (a TextField) in the search_fields, the search does nothing. Just returns the default change_list view. If I take it out, everything works fine. Any ideas?

Re: limit_choices_to: getting access to current instance

2007-01-29 Thread qhfgva
Thanks for the response. I'm not sure if this exactly covers my case but I like this feature. From the example given in the ticket: def assigned_tasks(): return get_assigned_tasks_id_list(blah, blah) class TimeRecord(models.Model): task = models.ForeignKey(Task, limit_choices_to = {'id_

Re: Internal Server Error (Apache+mod_python) - why?

2007-01-29 Thread Kristian Klette
Well, at least I got it working today :) Still dont know what was wrong, but after some fiddling it started working :) -- Mvh Kristian Klette «Programs for sale: Fast, Reliable, Cheap: choose two.» --~--~-~--~~~---~--~~ You received this message because you ar

Re: QuerySet generating wrong SQL

2007-01-29 Thread Don Arbow
On Jan 29, 2007, at 4:22 AM, innervision wrote: > > How can I tell the queryset to use an OR operator between the 'where' > clause and the conditions set-up in the Q object? http://www.djangoproject.com/documentation/models/or_lookups/ Don --~--~-~--~~~---~--~~

Re: HTTP REQUEST/RESPONSE

2007-01-29 Thread James Bennett
On 1/29/07, Chatchai Neanudorn <[EMAIL PROTECTED]> wrote: > I have already read it. But what I mean is, I need to write other program > (java,.net) to use my django app (generate a http post request messge and > extract a response to get data ). so, I need to know a real-format. > Anyway, thank v

Re: memcached backed

2007-01-29 Thread Jacob Kaplan-Moss
On 1/28/07 8:08 PM, [EMAIL PROTECTED] wrote: > why doesn't the memcached backend support 'replace'? I'm not sure what you mean:: >>> cache.set("key", "val1") >>> cache.get("key") "val1" >>> cache.set("key", "val2") >>> cache.get("key") "val2" Isn'

Re: HTTP REQUEST/RESPONSE

2007-01-29 Thread Chatchai Neanudorn
I have already read it. But what I mean is, I need to write other program (java,.net) to use my django app (generate a http post request messge and extract a response to get data ). so, I need to know a real-format. Anyway, thank very. Other idea is welcomed. chatchai 2007/1/29, James Bennett <[

Re: Cent OS Deployment

2007-01-29 Thread Phil Powell
I've currently got a large-scale app in development on CentOS (but to be deployed on Red Hat), but it's running on Python 2.3. Aside from your Python install, there are also a few pre-requisites you might need to install alongside Django, such as MySQL-Python. Don't know if it's any help, but he

Re: HTTP REQUEST/RESPONSE

2007-01-29 Thread James Bennett
On 1/29/07, Chatchai Neanudorn <[EMAIL PROTECTED]> wrote: > I need to know what is structure of request/response create by django. How > to capture or are there any tools to see what request and response is? http://www.djangoproject.com/documentation/request_response/ -- "Bureaucrat Conrad, you

HTTP REQUEST/RESPONSE

2007-01-29 Thread Chatchai Neanudorn
I need to know what is structure of request/response create by django. How to capture or are there any tools to see what request and response is? Thank chatchai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: customizing how the slug fields are populated

2007-01-29 Thread Jonathan Buchanan
On 1/29/07, omat * gezgin.com <[EMAIL PROTECTED]> wrote: > > About a year ago, there had been a discussion on a similar topic: > http://groups.google.com/group/django-users/browse_thread/thread/ > 006108ff1b23c36c > > But most of the important points were left unanswered. The topic is > expired, s

customizing how the slug fields are populated

2007-01-29 Thread omat * gezgin.com
About a year ago, there had been a discussion on a similar topic: http://groups.google.com/group/django-users/browse_thread/thread/ 006108ff1b23c36c But most of the important points were left unanswered. The topic is expired, so I am starting a new one. I think it is very important to be able

QuerySet generating wrong SQL

2007-01-29 Thread innervision
I'm having a problem when I try to create a queryset with a call to filter() and extra(). No matter what operator I use when generating the expression I end up with an SQL query that ANDs the filter() and extra() parameters, rather than ORing them. Example: <<< code >>> class ProjectManager(m

memcached backed

2007-01-29 Thread [EMAIL PROTECTED]
why doesn't the memcached backend support 'replace'? thanks mark --~--~-~--~~~---~--~~ 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 unsubscrib

Re: Internal Server Error (Apache+mod_python) - why?

2007-01-29 Thread Karen Tracey
I'm stumped. You definitely want the Python dotted-path notation in the SetEnv for DJANGO_SETTINGS_MODULE, but even using the wrong value there doesn't produce a 500 on my apache2. I get a PythonHandler traceback page showing me that django can't find my settings file (and this is also logge

Re: "cannot import" error when doing an import of an app's models

2007-01-29 Thread Phil Powell
Well, after looking at this thread [1], it would appear that the problem came down to a recursive imports. I had two apps referencing each others models, with m2m references going back and forward, which created a whole mess when it came to validating. So, since this was down to bad design on my

Re: block.super

2007-01-29 Thread Jeremy Dunck
On 1/29/07, Rob Slotboom <[EMAIL PROTECTED]> wrote: ... > > I tried > {{ block.super }} > {{ block.super.super }} > {{ block.super.block.super }} > But none of these are doing the right thing. Is there a way to call > the parents parent blocks? > > Perhaps block.parent.super is what you want?

Re: Large scale Django deployment - advice needed

2007-01-29 Thread J
Mike - Thanks, I'll check 'er out. J On Jan 27, 11:09 am, "Mike" <[EMAIL PROTECTED]> wrote: > Jason, > > Have you seen Chapter 21 of The Django Book, just released a few days > ago? > > Chapter 21: Deploying Djangohttp://www.djangobook.com/en/beta/chapter21/ > > It discusses load balancing and

Re: limit_choices_to: getting access to current instance

2007-01-29 Thread [EMAIL PROTECTED]
See patch on ticket . On Jan 29, 8:31 am, "qhfgva" <[EMAIL PROTECTED]> wrote: > If my original post was not entirely clear, I'm interested in any > method available to limit_choices_to that lets you dynamically create > the list of available options as a

Re: Restricting q QuerySet based on ManyToManyField

2007-01-29 Thread [EMAIL PROTECTED]
Ram- I believe that User.objects.filter(related__name__starts_with='A') would get you what you're looking for, per the example at starting with block "# We can perform kwarg queries across m2m relationships". On Jan 28, 11:19 am, "Ramashish Baranwal" <[EMAIL PROTECTED]> wrote: > Hi, > > I w

Re: limit_choices_to: getting access to current instance

2007-01-29 Thread qhfgva
If my original post was not entirely clear, I'm interested in any method available to limit_choices_to that lets you dynamically create the list of available options as a function of the current model instance. thanks. On Jan 28, 4:28 pm, "qhfgva" <[EMAIL PROTECTED]> wrote: > I currently have

Re: Help with Last Seen (why doesn't this work???)

2007-01-29 Thread [EMAIL PROTECTED]
Anyone? I know this is a common question... I've seen it come up more than once (frankly, I've asked more than once). And I know that some people have alluded to having an answer. I know having some method of tracking when the user was last at the site is important to other people. So, can AN

Re: Why is my Django install so slow?

2007-01-29 Thread Joe
Well, we figured it out. The USB bus on the motherboard of the WS was failing, and Linux was writing a ridiculous amount of error messages to the log, which crippled hard drive IO. Go figure. On Jan 15, 9:01 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 15-Jan-07, at 10:23 PM, Joe wro

block.super

2007-01-29 Thread Rob Slotboom
On my base template I have a block, say X One level down there is a section template (extending base) overwriting block X Further down there are templates (extending section). On these templates I want to be able to get the original value of X. I tried {{ block.super }} {{ block.super.super

Re: optimizing queries

2007-01-29 Thread Jam
I think using SQL could be quite database independant though less readable. Anyway, executing a count query for each "TagName" is not acceptable. So if there's no "django way" to do that, I would recommand SQL --~--~-~--~~~---~--~~ You received this message bec

Re: textarea - autoamtic line break

2007-01-29 Thread Aidas Bendoraitis
Line-break CSS property should help you here: http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/linebreak.asp However, it may not be supported by most browsers at the moment. Regards, Aidas Bendoraitis aka Archatas On 1/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >

optimizing queries

2007-01-29 Thread [EMAIL PROTECTED]
Hi, sometimes I find myself in a need of raw sql, for example when joining tables that don't have explicit related fields. In those cases "extra" method comes in really handy. For example I have following models. class TagName(models.Model): name = model.CharField() class Tag(models.Model):

Re: Internal Server Error (Apache+mod_python) - why?

2007-01-29 Thread Kristian Klette
I have the same system on my server, and im fighting the same problem. Ive tried both SetEnv methods to no prevail. The weird part is apache not showing _anything_ in its logs :/ -- Mvh Kristian Klette «Programs for sale: Fast, Reliable, Cheap: choose two.» --~--~-~--~~--