Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.
This repository was archived by the owner on May 5, 2021. It is now read-only.

Django 2.0 compatibility #46

@tdruez

Description

@tdruez

Django 2.0 is now available https://www.djangoproject.com/weblog/2017/dec/02/django-20-released/

django-rest-hooks cannot be used with Django 2.0 at the moment:

[...]
lib/python3.6/site-packages/rest_hooks/models.py", line 43, in AbstractHook
    user = models.ForeignKey(AUTH_USER_MODEL, related_name='%(class)ss')
TypeError: __init__() missing 1 required positional argument: 'on_delete'

From https://docs.djangoproject.com/en/2.0/releases/2.0/#features-removed-in-2-0:

The on_delete argument for ForeignKey and OneToOneField is now required in models and migrations.

A value need to be set for on_delete on the user ForeignKey of the AbstractHook
model: https://github.com/zapier/django-rest-hooks/blob/master/rest_hooks/models.py#L43

@avelis any input on what should be a safe default value? CASCADE?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions