#10840: URL fetching for AJAX libraries ---------------------------------------------+------------------------------ Reporter: mathijs | Owner: nobody Status: new | Milestone: Component: Generic views | Version: SVN Resolution: | Keywords: ajax url generic fetch Stage: Design decision needed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ---------------------------------------------+------------------------------ Comment (by mlouro):
I don't think a generic view is ideal for this, since it would require one ajax call to the server to retrieve urls. I have built a simple command (dump_urls) that outputs a JS Object Literal with view names and urls that I think is a good start for something like this, and a better approach design wise. It lives @ http://github.com/mlouro/django-extensions for now Example output: { "task_ajax_complete": "/projects/<project_id>/task/ajax/complete/<task_id>/", "task_ajax_remove": "/projects/<project_id>/task/ajax/remove_task/", "task_delete": "/projects/<project_id>/task/delete/<task_id>/", "task_detail": "/projects/<project_id>/task/<task_id>/", "task_edit": "/projects/<project_id>/task/save/<task_id>/", "task_index": "/projects/<project_id>/task/", "time_add": "/projects/<project_id>/time/save/", "time_delete": "/projects/<project_id>/time/delete/<time_id>/", "time_edit": "/projects/<project_id>/time/save/<time_id>/", "time_index": "/projects/<project_id>/time/" } -- Ticket URL: <http://code.djangoproject.com/ticket/10840#comment:5> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---