I try to compile an old code in Django 1.4 Many things are deprecated. I manage to change some of them but I don't knwo how to go futher on the urls.py
here is the old code
from django.conf.urls.defaults import *
from django.conf import settings
dynurls = patterns('minesweepr.views',
(r'^api/minesweeper_solve/$', 'api_solve'),
)
staticurls = patterns('minesweepr.views',
(r'^player/$', 'template_static'),
(r'^query/$', 'template_static'),
)
urlpatterns = patterns('',
('^%s' % settings.BASE_URL, include(dynurls)),
('^%s' % settings.BASE_STATIC_URL, include(staticurls)),
)
I know django.conf.urls.defaults is deprecated and I tried to change the code like this
But it is not sufficient It is said my url patterns are invalid. Anybody has an idea ? Thank you
from django.conf.urls import url, include from django.conf import settings dynurls = ['minesweepr.views', (r'^api/minesweeper_solve/$', 'api_solve'), ] staticurls = ['minesweepr.views', (r'^player/$', 'template_static'), (r'^query/$', 'template_static'), ] urlpatterns = ['', ('^%s' % settings.BASE_URL, include(dynurls)), ('^%s' % settings.BASE_STATIC_URL, include(staticurls)), ]
--
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 django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f5ff4194-ae39-4020-ab80-9373ea19d15a%40googlegroups.com.