Django: How to dynamically load different urlconfs? -


What am I trying to do:

  # urls.py urlpatterns = Pattern ('', ('R' ^ info / (? P & lt; user & gt; [- \ w +]) / (? P & lt; app & gt; [- \ w +]) / ', (% App% .urls)),)  

should display specific information that the user had entered for the app. And I want to keep url scheme in such a way. Is this possible? I think the namespace would be the trick but the official document is very rare and there is a lack of good examples.

Can anyone put some light on this issue?

If I understand correctly, then depending on the value of the 'app' element in your url Trying to dynamically include different urlconfs.

I see what to do with namespaces. Quite simply, there is no way to do this Urlconfs is compiled at startup, so dynamically can not contain different things.

The only way you can access whatever you want is to keep the specific URL for each value of the app, each contains the relevant URL configured.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -