Re: threadlocals with limit_choices_to in models

2006-09-27 Thread Luke Plant
group=threadlocals.get_current_user()' in the example code, is fixed from the first time this module is imported. Whether the threadlocal middleware code has been called at all by this point may well depend on import order of the different bits and pieces. Luke -- Hofstadter's La

Re: "slice" xhtml content and keep it valid xhtml?

2006-09-27 Thread Luke Plant
rings internally (default UTF8), so you might want to decode into unicode strings before slicing, then re-encode. Luke -- Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law. Luke Plant || L.

Re: Tutorial for MR

2006-05-03 Thread Luke Plant
ything works OK, dir shows all my > > model classes... > > I thought this should work, but I must admit that a quick test I did > just now completely failed. Wait for the Earth to turn a little more > on its axis: Luke Plant has a bit of experience in this area (every > time it

Re: Tutorial 2 - Admin

2006-05-03 Thread Luke Plant
'*.pyc' | xargs rm Luke -- "I spilled spot remover on my dog. Now he's gone." (Steven Wright) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: Tutorial for MR

2006-05-04 Thread Luke Plant
On Wednesday 03 May 2006 23:52, Luke Plant wrote: > /myproject > /myapp > /models > __init__.py > foo.py > bar.py > > > In __init__.py, I have: > -- > from foo import Foo, SomeThingElse > from bar import

Re: Tutorial for MR

2006-05-05 Thread Luke Plant
a slightly tricky problem... Luke -- "I think you ought to know I'm feeling very depressed." (Marvin the paranoid android) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because

Re: Error creating SQL with string field containing a single quote.

2006-05-06 Thread Luke Plant
e to escape your data properly. Luke -- "It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife." (Jane Austen) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~

Re: [MySQLdb] Could not load database backend: cannot import name ImmutableSet.

2006-05-06 Thread Luke Plant
s a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife." (Jane Austen) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because you are

Re: Admin Functionality Enhancement

2006-05-06 Thread Luke Plant
Luke -- "It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife." (Jane Austen) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received

Re: order by m2m field?

2006-05-06 Thread Luke Plant
it in SQL, and do it in a generic way. Luke -- "It is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife." (Jane Austen) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~--

Re: DSN useful for database settings?

2006-05-09 Thread Luke Plant
wrong with it. I imagine you'll end up with some kind of 'django utils' module if you write more than one Django app, and it can live in there. Luke -- Life is complex. It has both real and imaginary components. Luke Plant || L.Plant.98 (at) ca

Re: django / IDE integration

2006-05-10 Thread Luke Plant
this: http://code.djangoproject.com/ticket/1821 Luke -- "Love is like an hourglass, with the heart filling up as the brain empties." Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because you are sub

Re: Best practice for separating Model and Control?

2006-05-11 Thread Luke Plant
more of it." (Marvin the paranoid android) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: How to prevent a page from being cached?

2006-05-12 Thread Luke Plant
uot;Mediocrity: It takes a lot less time, and most people don't realise until it's too late." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: How to prevent a page from being cached?

2006-05-13 Thread Luke Plant
everything you need is in these modules: http://code.djangoproject.com/browser/django/trunk/django/views/decorators/cache.py http://code.djangoproject.com/browser/django/trunk/django/utils/cache.py Luke -- "Mistakes: It could be that the purpose of your life is only to serve as a warning to others."

Re: help with view/template data

2006-05-13 Thread Luke Plant
akes: It could be that the purpose of your life is only to serve as a warning to others." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: Problems with ForeignKey in magic-removal

2006-05-16 Thread Luke Plant
ottom of a very deep, dark hole. That seems a familiar concept. What does it remind me of? Ah, I remember. Life." (Marvin the paranoid android) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received thi

Re: Best way to do a dynamic sidebar?

2006-05-18 Thread Luke Plant
y pass the context vars every time. Luke -- OSBORN'S LAW Variables won't, constants aren't. Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Re: Best way to run dev and production site concurrently on same server?

2006-05-20 Thread Luke Plant
ng the necessary Site objects and setting the SITE_ID option correctly in your settings files. Other than that I can't see any problems. Luke -- Parenthetical remarks (however relevant) are unnecessary Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ X-Google-Language: ENG

Re: does django go to 11?

2006-05-22 Thread Luke Plant
change, but that doesn't happen very much any more. Luke X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.11.53.63 with SMTP id b63mr118065cwa; Mon, 22 May 2006 02:39:25 -0700 (PDT) X-Google-Token: EBWqpwwAAAB4EXIwnd4uBocvG1Cd6aYZ Received: from 217.67.53.216 by y43g2000cwc.googlegrou

Re: Searching on a calculated value

2006-05-25 Thread Luke Plant
Gary Wilson wrote: > Am I correct that it is good database-design practice to not store > derived or calculated fields in your database (e.g. full_name when you > have first_name and last_name)? How then do you go about querying a > derived field? I believe that people often use 'indexed views

Tagging app

2006-05-25 Thread Luke Plant
I implemented along the way is even more generic, including some 'generic foreign key' descriptors and 'generic m2m object' descriptors, which manage to avoid using any SQL directly, and so should be very robust. They depends

Re: Tagging app

2006-05-26 Thread Luke Plant
Ivan Sagalaev wrote: > The single target means that one tag can't be used for different models? Yep, a single 'Tag' object is associated with just one target and one creator. However, you can easily tag different models and objects with the same bit of text. > I have chosen a different approa

Re: Tagging app

2006-05-26 Thread Luke Plant
arthur debert wrote: > ps: how is the GenericForeignKey going to work? will it be imported > from the tagging app's package, or will it go into trunk? There is no guarantee that any of this stuff will go into trunk at all - the core django devs would obviously have to be for it first. But the

Re: Slicing [-1] on objects.all()

2006-05-26 Thread Luke Plant
Jay Parlar wrote: > Maybe a note should go into the db_api docs about -1 not working? I > did look at those docs before sending my original message, and didn't > see anything about that. I think it should throw an exception saying that negative indices are not supported (and even include a hint

Re: Please help this newbie

2006-05-26 Thread Luke Plant
Salvage wrote: > I have never coded in python and even my knowledge of php is > limited(though I can install any script with php). But I see from the > news sites that are built with django, that it has all that i need for > newspaper/media sites. I want to know if I django can be installed in a

Re: Please help this newbie

2006-05-26 Thread Luke Plant
Salvage wrote: > I understand when you say I cant build those sites without having > programing skills but are there no modules that are already pre-built > like print this article, comment on this article, send by email, most > popular etc. That one can call with some django tags or something l

Re: Slicing [-1] on objects.all()

2006-05-26 Thread Luke Plant
erySet to assume that. Luke -- The early bird gets the worm, but the second mouse gets the cheese. --Steven Wright Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: SQL Unions with QuerySets?

2006-05-26 Thread Luke Plant
y. Yeah, I'm in love with that stuff too. I have to get out more. Luke -- The early bird gets the worm, but the second mouse gets the cheese. --Steven Wright Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~

Re: Q behavior with filter() and exclude()

2006-05-26 Thread Luke Plant
l. After that I went into a bit of a decline." (Marvin the paranoid android) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django user

Re: Tagging app

2006-05-26 Thread Luke Plant
to a bit of a decline." (Marvin the paranoid android) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Tagging app

2006-05-27 Thread Luke Plant
s imaginary. Please rotate your telephone by 90 degrees and try again." Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gr

Re: Accessing instance values in a model...

2006-05-31 Thread Luke Plant
ve() and move the document to the correct folder after the model instance has been saved. Luke -- "The truth will set your teeth free." (Calvin and Hobbes) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You receiv

Re: Controlling Display of Foreign Key Input Fieldsets in Admin

2006-05-31 Thread Luke Plant
ere are some docs somewhere about styling the admin). Luke -- "The truth will set your teeth free." (Calvin and Hobbes) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because you

Re: how to use instance method in the validator_list of a field in model?

2006-05-31 Thread Luke Plant
ass Category(models.Model): ## fields etc here def validate(self): error_dict = super(Category, self).validate() # Do your validation here, adding to 'error_dict' # and then: return error_dict Luke -- "The truth will set your teeth free.&q

Re: Controlling Display of Foreign Key Input Fieldsets in Admin

2006-06-01 Thread Luke Plant
ates, and do so on a per model basis, which might be the best way of doing this. Luke -- "Trouble: Luck can't last a lifetime, unless you die young." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~-

Re: how to use instance method in the validator_list of a field in model?

2006-06-01 Thread Luke Plant
el, but I can't remember how far it progressed. Obviously not as far as getting the manipulators to work that way. Luke -- "Trouble: Luck can't last a lifetime, unless you die young." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~

Re: Django magic removal and access to user into template.

2006-06-05 Thread Luke Plant
tly logged in user available to various model methods, since there is no other way to do this.] Luke -- "Whoever calls on the name of the LORD will be saved." (Romans 10:13) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~-

Re: combining models in something like a queryset?

2006-06-05 Thread Luke Plant
different tables. If you create an index on that view, you may be able to do an ORDER BY efficiently over the relevant column. I'm not sure though. Obviously it depends on your db supported indexed views. Luke -- "Whoever calls on the name of the LORD

Re: TypeError adding an item in the Admin UI

2006-06-05 Thread Luke Plant
On Monday 05 June 2006 14:02, Chris H wrote: > The full error is: > TypeError at /admin/catalog/item/add/ > __deepcopy__() takes exactly 2 arguments (1 given) Adrian fixed it in svn, my bad sorry. Luke -- "Whoever calls on the name of the LORD will be saved." (Romans

Re: combining models in something like a queryset?

2006-06-06 Thread Luke Plant
> One possible method is to create a VIEW in your db that does a UNION of > columns from different tables. I meant to say: ...does a UNION of rows from different tables, selecting columns or calculated columns that are equivalent. Luke --~--~-~--~~~---~--~~ You

Re: Possibly new Django user questions

2006-06-10 Thread Luke Plant
but that the admin uses itself -- it's impossible not to depend on them in some way. There are SoC plans to make authorisation more modular though, or at least more capable. Luke -- The probability of someone watching you is proportional to the stupidity of your action. Luke Plan

Re: When to use django.db.models.LazyDate() and when datetime.now()?

2006-06-10 Thread Luke Plant
ore case to worry about - default arguments to functions and methods are evaluated when the function is defined, not when it is called.) Luke -- The probability of someone watching you is proportional to the stupidity of your action. Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant

Re: Extending User model after magic-removal

2006-06-10 Thread Luke Plant
_name__.split('.')[-2]" logic should exist in only one place. Other than that it seems quite good -- maybe you should create a ticket. Luke -- The probability of someone watching you is proportional to the stupidity of your action

Re: OT: Password checker

2006-06-10 Thread Luke Plant
ompile it as a standalone binary -- it doesn't seem to depend on any libraries except standard C libs. Luke -- The probability of someone watching you is proportional to the stupidity of your action. Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~

Re: Order by Model Method?

2006-06-10 Thread Luke Plant
s/search?group=django-users&q=ordering+model+methods&qt_g=1&searchnow=Search+this+group Luke -- The probability of someone watching you is proportional to the stupidity of your action. Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~---

Re: MyFormWrapper.myfield works in {{}} but not {%%} ?

2006-06-10 Thread Luke Plant
it likes. Obviously limoudou's does not do what you want -- you'll have to ask him. Luke -- The probability of someone watching you is proportional to the stupidity of your action. Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~--

Re: Possibly new Django user questions

2006-06-10 Thread Luke Plant
ed model with edit_inline, and using the > AUTH_PROFILE_MODULE setting. Oops, thanks for the correction -- I just posted the link, thinking that it referred to the AUTH_PROFILE_MODULE setting. Luke -- The probability of someone watching you is proportional to the stupidity of your action. Luke

Re: TEMPLATE_CONTEXT_PROCESSORS confusion

2006-06-10 Thread Luke Plant
e UserInfo from that. Luke -- The probability of someone watching you is proportional to the stupidity of your action. Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Creating a root object for a many-to-one relationship

2006-06-10 Thread Luke Plant
e -- The probability of someone watching you is proportional to the stupidity of your action. Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: Strange problems in 0.91

2006-06-12 Thread Luke Plant
#x27;2005-01-01 00:00:00'. > > Or all filtering provided at application level? Django's ORM doesn't do any filtering in Python -- it generates the correct SQL and sends that to the database. Luke -- To iterate is human, to re

Re: m2m with 'self', limit_choice_to for excluding self

2006-06-12 Thread Luke Plant
ly) a class level attribute, and has no access to instance level data. Luke -- To iterate is human, to recurse, divine. L. Peter Deutch Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because

Re: MyFormWrapper.myfield works in {{}} but not {%%} ?

2006-06-13 Thread Luke Plant
hat is extracted and handled is the first word ('expr' in this case). It is the responsibility of the python code that is associated with 'expr' to parse the rest of the text inside {%%} as it sees fit. Luke -- I went to the Missing Persons Bureau. No one was there.

Re: How to do named HTML anchors with Django?

2006-06-13 Thread Luke Plant
ep, you need to spell it: /mypage/#foo Otherwise the CommonMiddleware will do a redirect to add the trailing slash that will strip the fragment. Luke -- I went to the Missing Persons Bureau. No one was there. Luke Plant || L.Plant.98 (at) cantab.net || http://

Re: Foreign keys and applications

2006-06-15 Thread Luke Plant
e -- "Adversity: That which does not kill me only postpones the inevitable." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: No such column error + tag question

2006-06-15 Thread Luke Plant
d here: http://feh.holsman.net/articles/2006/06/03/django-contenttype Luke -- "Adversity: That which does not kill me only postpones the inevitable." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~

Re: problem with related foreignkey in model

2006-06-15 Thread Luke Plant
ate and rewrite the contents of the Cite field. Have fun! Luke -- "Adversity: That which does not kill me only postpones the inevitable." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ You rece

Re: Foreign keys and applications

2006-06-15 Thread Luke Plant
On Thursday 15 June 2006 19:12, Luke Plant wrote: > This is because your models are in different apps. I can't remember > off-hand what the correct syntax is of course, the way to find out is to use the /admin/doc/ view, or examine the object with 'dir' in a python inte

Re: Generic views and "include"

2006-06-15 Thread Luke Plant
lso, you may have to modify your templates to refactor out the bit that can be included into other templates. Luke -- A dyslexic agnostic doesn't believe in Dog Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~~---~--~~ Yo

Re: Custom manager filter by logged in user.

2006-06-17 Thread Luke Plant
ntage that it works for related objects too. Luke -- A former CEO: "Some of you think that only half of the Board of Directors do all the work and the rest do nothing, actually the reverse is true." (True Quotes From Induhviduals, Scott Adams) Luke Plant || L.Plant.98 (at) cantab.ne

Re: POST to view loses POST data

2006-06-17 Thread Luke Plant
#x27;successful' field -- the only field is an , and since it doesn't have a 'name' it can't be successful. Luke -- "Agony: Not all pain is gain." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ --~--~-~--~~-

Re: overriding-default-model-methods what am i doing wrong ?

2006-06-21 Thread Luke Plant
To debug, try making sure your code is actually being executed e.g. print statements or throwing exceptions at the relevant points. Luke -- As Ralph Waldo Emerson once said, "I hate quotations." Luke Plant || L.Plant.98 (at) cantab.net || htt

Re: ANN: Screencast demo of the WebFaction control panel

2006-06-21 Thread Luke Plant
ansferred a domain and 'went live' a few days ago was dead simple too -- everything was obvious and just worked. It's all very slick. Luke -- As Ralph Waldo Emerson once said, "I hate quotations." Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

OT: Re: ANN: Screencast demo of the WebFaction control panel

2006-06-22 Thread Luke Plant
Jay Parlar wrote: > Luke, which hosting plan are you using? I know that Shared 2 is the > minimum for Django, but I'm curious if it's "enough". I'm on shared 2, which seems to be fine for my needs. The main thing that would worry me is the amount of memory, so I haven't used any caching. Sinc

Re: Generic relations and tags

2006-06-27 Thread Luke Plant
re out all the > unique tag names. Would something like this do it? your_query_set.distinct().values('tag') Luke -- "Defeat: For every winner, there are dozens of losers. Odds are you're one of them." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || h

Re: Custom SQL in Q objects

2006-08-31 Thread Luke Plant
n accordingly. Thankfully this should be pretty easy using the 'js' admin option. Luke -- "Pessimism: Every dark cloud has a silver lining, but lightning kills hundreds of people each year trying to find it." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || htt

Re: File Upload Issue

2005-10-15 Thread Luke Plant
trates his love towards us in this, that while we were still sinners, Christ died for us." (Romans 5:8) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ pgpc6Rgti1Lnw.pgp Description: PGP signature

Re: ORM funkiness when doing Many2Many to intermediary table with the same source table twice

2005-10-20 Thread Luke Plant
s page: http://code.djangoproject.com/wiki/ModelSyntaxChangeInstructions Luke -- "Idiocy: Never underestimate the power of stupid people in large groups." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: I want to start a django project for a forum

2005-10-31 Thread Luke Plant
how you designed them I think. Luke -- "I'm at peace with the world. I'm completely serene. I know why I was put here and why everything exists. I am here so everybody can do what I want. Once everybody accepts it, they'll be serene too." (Calvin and Hobbes) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: HTTP_REFERER

2005-11-05 Thread Luke Plant
t.META.get('HTTP_REFERER', None) You should also note that the header can be forged, and some people have it turned off for privacy reasons, so I wouldn't rely on it being there. It is not reliably present, and not reliable if present. Luke -- "I regret I wasn't born

please vote for this Django related Konqueror bug

2005-11-08 Thread Luke Plant
http://bugs.kde.org/show_bug.cgi?id=113181 (Requires a KDE bugzilla account, which is of course free and easy to create). Cheers, Luke -- "I think you ought to know I'm feeling very depressed." (Marvin the paranoid android) Luke Plant || L.Plant.98 (at) can

Re: django-admin not seeing settings.py

2005-11-10 Thread Luke Plant
viron['DJANGO_SETTINGS_MODULE'] = 'myapp.settings' Alternatively, to set it permanently, put the export PYTHONPATH and DJANGO_SETTINGS_MODULE settings in your ~/.bashrc, then start a new bash session. Luke Luke -- "I washed a sock. Then I put it in the dryer. When I took it out, it was gone." (Steven Wright) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: Preventing Google Web Accelerator from prefetching

2005-11-16 Thread Luke Plant
on the value of the HTTP_X_MOZ header, or some such. There is some relevant documentation here: http://www.djangoproject.com/documentation/cache/ Luke -- "Mistakes: It could be that the purpose of your life is only to serve as a warning to others." (despair.com) Luke Plant || L.Pl

Re: Preventing Google Web Accelerator from prefetching

2005-11-17 Thread Luke Plant
the site we developed with GWA installed, they will mysteriously find themselves subscribed to every page they visit... Luke -- "My capacity for happiness you could fit into a matchbox without taking out the matches first." (Marvin the paranoid android) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Validator app+middleware

2005-11-18 Thread Luke Plant
t would work on Windows, but would probably be significantly slower due to starting new processes being quite a bit slower on Windows. Regards, Luke -- "Oh, look. I appear to be lying at the bottom of a very deep, dark hole. That seems a familiar concept. What does it remind me of? A

Re: Validator app+middleware

2005-11-19 Thread Luke Plant
the bottom of a very deep, dark hole. That seems a familiar concept. What does it remind me of? Ah, I remember. Life." (Marvin the paranoid android) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: Paginating complex queries

2005-11-22 Thread Luke Plant
nto the context it would make template tags like this more re-usable. Finally, looking at my code, I think the controls in the template could be refactored much more nicely into their own custom template tags. Luke -- "Outside of a dog, a book is a man's best friend... inside of a dog, it&

Re: Form Value Array

2005-11-22 Thread Luke Plant
of a dog, a book is a man's best friend... inside of a dog, it's too dark to read." Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: Newbie needs help with real-world example...

2005-12-01 Thread Luke Plant
com DB? I wouldn't have thought it was publicly available. Luke -- "The number you have dialed is imaginary. Please rotate your telephone by 90 degrees and try again." Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: weird template(?) error

2005-12-27 Thread Luke Plant
trips up when trying to do repr() over partly constructed objects (or something like that). Luke -- "Agony: Not all pain is gain." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: Using Change Manipulators to Update Only a Subset of Model Data

2005-12-30 Thread Luke Plant
to call the validators directly. Luke -- "A man in love is incomplete until he is married. Then he is finished." -- Zsa Zsa Gabor, "Newsweek" Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: Multiple apps on one page, how?

2006-01-02 Thread Luke Plant
polls.get_list()} c.update(get_extra_standard_stuff(request)) render_to_response("template_name", c) The only thing that is then repeated is the call to get_extra_standard_stuff(). And you can eliminate that if you use DjangoContext and this feature: http://www.djangoproject.

Re: Django and MS SQL

2006-01-10 Thread Luke Plant
ng parameters - they avoid SQL injection). Luke -- "Dysfunction: The only consistent feature of all of your dissatisfying relationships is you." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: Models and access to one-to-many

2006-01-14 Thread Luke Plant
ows the way I take: when he has tried me, I shall come forth as gold" (Job 23:10). Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: Passing template tags template variables

2006-01-14 Thread Luke Plant
, and is very easy. Luke -- "He knows the way I take: when he has tried me, I shall come forth as gold" (Job 23:10). Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: Templates for Python Programmers error

2006-01-14 Thread Luke Plant
he has tried me, I shall come forth as gold" (Job 23:10). Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: extra context processors

2006-01-17 Thread Luke Plant
the trend setter :-) I guess it would depend on what kind of thing they contain i.e. do they relate to a certain app, or custom tag, or model. Luke -- "I asked mom if I was a gifted child. She said they certainly wouldn't have paid for me." (Calvin and Hobbes) Luke Plant || L.

Re: unordered_list... explanation?

2006-01-18 Thread Luke Plant
[ ), > and it works, > > but i am unable to understand it. It uses an empty list to indicate the end of a list, I'm not sure exactly why :-). There are more examples in the tests (under 'othertests'). Luke -- "Idiocy: Never underestimate the power of

Re: broken link in templates_python

2006-01-18 Thread Luke Plant
eople in large groups." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: broken link in templates_python

2006-01-19 Thread Luke Plant
confusion. If you wanted we could come to a fairer compromise on the disambiguation front: from holt.skibinski import Luke as LukeH from plant import Luke as LukeP :-) Luke P -- If you can't answer a man's arguments, all is not lost; you can still call him vile names. (Elbert Hubbar

Re: Question About Multi Column Keys

2006-01-31 Thread Luke Plant
ple way of being able to specify an object to delete. Luke -- "Ineptitude: If you can't learn to do something well, learn to enjoy doing it poorly." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ -- "Ineptitude: If you can't learn to d

Re: Error when relating a model to another model more than once

2006-01-31 Thread Luke Plant
robably better to wait. Luke -- "Ineptitude: If you can't learn to do something well, learn to enjoy doing it poorly." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/ -- "Ineptitude: If you can't learn to do something well, learn to enjoy doing it poorly." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: Question About Multi Column Keys

2006-01-31 Thread Luke Plant
rn to enjoy doing it poorly." (despair.com) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: Error when relating a model to another model more than once

2006-02-01 Thread Luke Plant
;!) Luke -- I never hated a man enough to give him his diamonds back. (Zsa Zsa Gabor) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: new here and where/how/what to cache...

2006-02-01 Thread Luke Plant
POST requests, and only POST requests should have side effects. So for adding a vote, you should use a POST request and this will always return a fresh page, so this example should work out fine. Luke -- I never hated a man enough to give him his diamonds back. (Zsa Zsa Gabor) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: template ifequal

2006-02-01 Thread Luke Plant
--something--- > {% endifequall %} > > Is there any good way to do this? This seems like a bug to me - certainly it is inconsistent behaviour between {% if %} (where you can do 'var1|lower' etc) and {% ifeqaul %}. I would file a bug report. Luke -- I never hated a

Re: Modified Preorder Tree Traversal on the Wiki

2006-02-01 Thread Luke Plant
angoproject.com/documentation/model_api/ Regards, Luke -- I never hated a man enough to give him his diamonds back. (Zsa Zsa Gabor) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: Problem using a related object in __repr__()

2006-02-01 Thread Luke Plant
never hated a man enough to give him his diamonds back. (Zsa Zsa Gabor) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

Re: template ifequal

2006-02-02 Thread Luke Plant
;{% if var1|length_is:"0" %}You can use \ ... filters in if{% endif %}').render({'var1':''}) 'You can use filters in if' (Well, at least in magic-removal you can). Luke -- "In my opinion, we don't devote nearly enough scientific research to fi

Re: Magic removal

2006-02-04 Thread Luke Plant
instructions for changing your code: http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges Luke -- "I spilled spot remover on my dog. Now he's gone." (Steven Wright) Luke Plant || L.Plant.98 (at) cantab.net || http://lukeplant.me.uk/

  1   2   >