On Sat, Jul 6, 2013 at 3:48 AM, R. Eastbourne <[email protected]> wrote:
> I would like these URLs assigned automatically.
i've done this once. crude, but works ok:
------ at the end of urls.py ------
def _simpleurl(viewname, mod):
return url ('^%s/$'%viewname, getattr(mod, viewname), name=viewname)
urlpatterns += patterns ('', *(_simpleurl(vn,views) for vn in
views.simpleviews))
---------------------------
where views.simpleviews is a list of function names defined in views.py.
--
Javier
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.