Hi All, I've got a Django project composed of several apps. The site's
main page creates links from the list of installed apps like so:

#taken from the project's urlconf
apps = [app.split('.')[1] for app in settings.INSTALLED_APPS if
app.startswith(#project name#)]
info_dict = {'template': 'index.html', 'extra_context': {'apps':
apps},}
urlpatterns = patterns('',(r'^$',
'django.views.generic.simple.direct_to_template', info_dict),)

Then in the template the links are created from the apps list. Now my
boss wants to be able to change the labels and order of those links by
going through the admin. I can't come up with any elegant solution to
this. Best I've come up with is creating a new model (with app_name,
label, and order fields) that somehow gets populated with instances
dynamically.

Can anyone think of a beautiful (simple) solution? Or should I just
tell my boss to go f%&^ himself? ;) Just kidding!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to