I am writing a website that requires importing different sql models to different urls according to argument. Specifically:
if the url is:
http://127.0.0.1:8000/detail/abc
where abc is the also a model name in sql database
then in views.py:
def detail(request, arg):
from book.models import arg
my expected result is:
from book.models import abc
any idea? thanks a lot.