question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Compatibility issue with newer Django (1.8/1.10)

See original GitHub issue

django.conf.urls.patterns() is deprecated since Django 1.8 and removed in 1.10. It is imported however in dj.py. See https://docs.djangoproject.com/en/dev/releases/1.8/#django-conf-urls-patterns

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
ElSaicocommented, Nov 14, 2016

Fixed by #84.

1reaction
jadsonbrcommented, Oct 10, 2016

Temporarily adapted the dj.py file on line 4 to make it as follows.

from django.conf.urls include import, url

and function in-line so that it was 74 in the following manner.

    @classmethod
    def urls(cls, name_prefix=None):
        """
        A convenience method for hooking up the URLs.

        This automatically adds a list & a detail endpoint to your URLconf.

        :param name_prefix: (Optional) A prefix for the URL's name (for
            resolving). The default is ``None``, which will autocreate a prefix
            based on the class name. Ex: ``BlogPostResource`` ->
            ``api_blogpost_list``
        :type name_prefix: string

        :returns: A ``patterns`` object for ``include(...)``
        """
        urlpatterns = [
            url(r'^$', cls.as_list(), name=cls.build_url_name('list', name_prefix)),
            url(r'^(?P<pk>\d+)/$', cls.as_detail(), name=cls.build_url_name('detail', name_prefix)),        
        ]
        return urlpatterns
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to upgrade Django to a newer version
Look at the deprecation timeline for the relevant versions. Pay particular attention to backwards incompatible changes to get a clear idea of what...
Read more >
Release notes - Django documentation
Each release note will tell you what's new in each version, and will also describe any backwards-incompatible changes made in that version.
Read more >
FAQ: Installation | Django documentation
Install Django (read the installation guide). Walk through the tutorial. Check out the rest of the documentation, and ask questions if you run...
Read more >
Django 4.0 release notes
Welcome to Django 4.0! These release notes cover the new features, as well as some backwards incompatible changes you'll want to be aware...
Read more >
Django 1.11 release notes
Welcome to Django 1.11! These release notes cover the new features, as well as some backwards incompatible changes you'll want to be aware...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found