/sample_project/batchimport/urls.py

http://django-batchimport.googlecode.com/ · Python · 35 lines · 15 code · 1 blank · 19 comment · 2 complexity · 1eea165d7f879b2b732ef1421222c2ea MD5 · raw file

  1. """
  2. URLConf for Django batch import and update.
  3. If the default behavior of the batchimport views is acceptable to
  4. you, simply use a line like this in your root URLConf to set up the
  5. default URLs for batchimport:
  6. (r'^batchimport/', include('batchimport.urls')),
  7. But if you'd like to customize the behavior (e.g., by passing extra
  8. arguments to the various views) or split up the URLs, feel free to set
  9. up your own URL patterns for these views instead.
  10. """
  11. from django.conf.urls.defaults import *
  12. from batchimport.views import import_start, import_options, import_execute
  13. urlpatterns = patterns('',
  14. # Activation keys get matched by \w+ instead of the more specific
  15. # [a-fA-F0-9]{40} because a bad activation key should still get to the view;
  16. # that way it can return a sensible "invalid key" message instead of a
  17. # confusing 404.
  18. url(r'^import_start/$',
  19. import_start,
  20. name='batchimport_import_start'),
  21. url(r'^import_options/$',
  22. import_options,
  23. name='batchimport_import_options'),
  24. url(r'^import_execute/$',
  25. import_execute,
  26. name='batchimport_import_execute'),
  27. )