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
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
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
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
4 matches
Mail list logo