Re: Should (or can) you have many to many relationship with abstract base class

2009-10-16 Thread Kurt Neufeld
You're mixing two metaphors and will run into troubles, just accept that relational databases are not an inherited object model. But to answer your question consider the following: table PetType: int id string name int number_of_legs table Pet int id int type_id // foreign

Re: trying to do ip based resolve

2009-10-13 Thread Kurt Neufeld
ng the debug_toolbar output (without css/js formatting). I'll file a bug if it's a bug and not just me not knowing how to write middleware. My middleware problem? debug_toolbar problem? Django problem? Kurt On 2009-10-04, at 2:23 PM, Kurt Neufeld wrote: > > Wow, was that ever easy. Than

Re: Redirect home page

2009-10-10 Thread Kurt Neufeld
You could use middleware to do this as I learned last week, but why not just make a "view" which is only a function. urls.py: ... (r'^$', 'views.DomainRootRedirect' ) ... views.py: def DomainRootRedirect( request, *args, **kwargs ): return

Re: trying to do ip based resolve

2009-10-04 Thread Kurt Neufeld
Wow, was that ever easy. Thanks for your help! Kurt For future googlers: settings.py: MIDDLEWARE_CLASSES = ( ... 'redirector.ConstructionFilterMiddleware', ... ) redirector/__init__.py: from django.shortcuts import render_to_response from django.conf import settings class