
from django.conf.urls.defaults import patterns

urlpatterns = patterns('',
                       (r'^post$', 'djangospam.cookie.views.spammer_view'),)

try:
    from django.conf.urls import patterns
except ImportError:
    from django.conf.urls.defaults import patterns

urlpatterns = patterns('',
                       (r'^post$', 'djangospam.cookie.views.spammer_view'),)
Add support for Django 1.4 and up
Add support for Django 1.4 and up

* Module django.conf.urls.defaults has been moved to django.conf.urls in
version 1.4.

Commit references issue #3.

  
+ try:
+     from django.conf.urls import patterns
+ except ImportError:
- from django.conf.urls.defaults import patterns
+     from django.conf.urls.defaults import patterns
  
  urlpatterns = patterns('',
                         (r'^post$', 'djangospam.cookie.views.spammer_view'),)
Add support for Django 1.4 and up
## Code Before:

from django.conf.urls.defaults import patterns

urlpatterns = patterns('',
                       (r'^post$', 'djangospam.cookie.views.spammer_view'),)
## Instruction:
Add support for Django 1.4 and up
## Code After:

try:
    from django.conf.urls import patterns
except ImportError:
    from django.conf.urls.defaults import patterns

urlpatterns = patterns('',
                       (r'^post$', 'djangospam.cookie.views.spammer_view'),)