Nevermind! Thanks to FunkyBob, I have a solution. I didn't realize you could
do this so easily, so I'll share it with others.
# views.py
def my_router(request):
view = MyCBV.as_view(template_name = 'foo.html')
return view(request)
Of course, I actually have logic in my function -- but I'm
Hey Guys,
I'm trying to create a "router" as recommended in IRC for several
different views. My Views are UpdateViews, so they are the new CBVs. I
don't mind my router being a simple function based view, though.
Basically, a User can edit some data. This data changes based upon the
user's "class"
2 matches
Mail list logo