Accessing Multiple Databases

2008-12-15 Thread Tom Eastman
Hey Guys, I'm about to start developing a web front-end for a large database being developed by a colleague. The web front-end is only going to be accessing a sub-set of the database, and mostly via 'views' that will be specific to the requirements of the web frontend. I want to use Django,

Accessing Multiple Databases.

2008-12-15 Thread Tom Eastman
Hey Guys, I'm about to start developing a web front-end for a large database being developed by a colleague. The web front-end is only going to be accessing a sub-set of the database, and mostly via 'views' that will be specific to the requirements of the web frontend. I want to use Django,

Re: Accessing Multiple Databases.

2008-12-16 Thread Tom Eastman
ggestion than that; it's primarily intuition > and gut-feeling, but you don't have to tell anybody that. Thanks Malcolm, that vague use-case was pretty much what I was thinking too, I'll read through the article and see what insights it has :-) Cheers! Tom -- T

Disabling the use of certain template tags

2010-06-29 Thread Tom Eastman
Hey guys, I'm planning on writing a django app that will serve as a tool for writing mail-merge type form letters. Well, not actually letters, but documents which will have variable substitution in them, to either rendered either as HTML or LaTeX documents or some other markup language. Of

Model Inheritance.

2010-10-27 Thread Tom Eastman
I'm working with model inheritance, and I need to convert my objects into instances of its subclass. Is there an easy way to do this? Looking at the example in: http://docs.djangoproject.com/en/1.2/topics/db/models/#multi-table-inheritance I have a whole bunch of 'Place' objects that are i

Re: Model Inheritance.

2010-10-28 Thread Tom Eastman
On 29/10/10 11:06, Carles Barrobés wrote: Your "place" object will contain an attribute called "restaurant" to access the object as an instance of the subclass. If this place object is an instance of another place subclass, accessing the restaurant attribute will raise a DoesNotExist error. Car

Routing to database based on user

2012-01-30 Thread Tom Eastman
Hey guys, I'm writing a django project that will require me to route queries to certain large databases based on who the logged in user is. So all the tables for django.contrib.auth and session and stuff will be in the 'central' database, as well as a table that maps users to which database they

Re: Routing to database based on user

2012-02-02 Thread Tom Eastman
On 31/01/12 11:45, akaariai wrote: > On Jan 31, 12:01 am, Tom Eastman wrote: >> Hey guys, >> >> I'm writing a django project that will require me to route queries to >> certain large databases based on who the logged in user is. >> >> So all the ta

Django deployment practices -- do people use setup.py?

2012-03-12 Thread Tom Eastman
delivers the archive and runs setup.py install etc. Is this silly? What are your thoughts? -- Tom Eastman // Catalyst IT Ltd. // +64 4 803 2432 signature.asc Description: OpenPGP digital signature

Re: Django deployment practices -- do people use setup.py?

2012-03-15 Thread Tom Eastman
edback -- but in the intervening time I've been using zc.buildout with two of my projects and I've quite liked the way it does things. Doesn't solve all my problems -- but it does seem to do a nice job of combining what using virtualenv and setup.py gets you. Cheers, Tom

New project: Planning for the future

2012-09-04 Thread Tom Eastman
7;six'? I've only heard of 'six', I'm yet to use it. The simple fact is that Python 3 is the 'future', but it's not the 'present', at least until Django and 3rd party libraries are all ready for it. If you have an opinion on any or many of the abo

Using etags for backend caching

2012-12-08 Thread Tom Eastman
Hey guys, My project makes pretty heavy use of etags for browser-level caching, but I'd like to go one step further and be able to cache pages on the backend keyed by the page's etag. As far as I can tell, none of the current built-in caching middleware/decorators or conditional processing d

FileWrapper not working for me.

2011-03-07 Thread Tom Eastman
Hey guys, I'm using the Maverick packages, so Django 1.2.3 I need to serve a large binary (an mp3 in this case) directly through Django to ensure good access control independent of the web server itself. I have the following snippet of code, to download binary files via django: filename