Re: Distributed databases

2008-04-16 Thread Norman Harman
I've never seen anything that would make this "easy" in Django itself. You will probably have more luck looking into sql proxies. Django will talk to the proxy, the proxy will figure out what database to actually query and return results to Django. This way Django doesn't have to change,

Re: How to extend django.views.generic.date_based to return more "context variables"?

2008-04-14 Thread Norman Harman
fizban wrote: > > On 14 Apr, 16:54, "Norman Harman" <[EMAIL PROTECTED]> wrote: > >> Why don't you use the extra_context parameter to generic views? Or am I >> misunderstanding what you are trying to do? >> >> def myview(request): >>

Re: How to extend django.views.generic.date_based to return more "context variables"?

2008-04-14 Thread Norman Harman
Why don't you use the extra_context parameter to generic views? Or am I misunderstanding what you are trying to do? def myview(request): context = dict() context["my_custom_var"] = "wwgd" return generic_view(request, extra_context = context, bla=blah,...) -- Norman J. Harman Jr.

Re: how do I create a zebra table using a template?

2008-04-11 Thread Norman Harman
Kenneth Gonsalves wrote: > On 11-Apr-08, at 9:36 PM, Kenneth Gonsalves wrote: > > >> On 11-Apr-08, at 9:28 PM, Chas. Owens wrote: >> >> >>> {% if forloop.counter % 2 %} >>> >> divisibleby >> > > http://www.djangoproject.com/documentation/templates/#divisibleby > > Wouldn't

Re: Link that performs an action

2008-04-11 Thread Norman Harman
Taylor wrote: > Thanks for the replies, but I guess I didn't make myself clear > enough. Counter was just as an example, I don't want an actual page > counter. > > I guess part of my question is: Yes, I can use AJAX-y XMLHttpRequest > to send info to the server in the background, but has

Re: Link that performs an action

2008-04-10 Thread Norman Harman
Taylor wrote: > Does something exist so that a link on a page performs an action > rather than just showing a view? > For example: I have a counter saved to the db, and every time a user > clicks the link, the counter increases by a certain number and saves. > > > without even visiting the

Re: Deploying Django

2007-11-16 Thread Norman Harman
Chris Hoeppner wrote: > Well, just to know. What are you using? This should also be useful for > my "little" project, the django deployer, still unnamed. I had the most frustration with a software in recent memory trying to use lighttpd. Config syntax was utterly weird and the docs conflicted

Re: Cache middleware causing unit tests to fail

2007-08-19 Thread Norman Harman
Eratothene wrote: > I think you better not disable cache middleware in tests. If tests > fail, so will be in production. I had similar problem, I thought it > was something wrong with tests, but really it was problem in the code. > My site was running well on django built-in server, but not on

Cache middleware causing unit tests to fail

2007-08-16 Thread Norman Harman
Hi, request.template is None instead of what it should be because the response is from the cache middleware. Which is fine. My question is there a good way to disable the cache middleware during tests? "good" being atleast the following. is automatic, isn't based of value of DEBUG,

<    1   2