Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Django 2.0 #604

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added dist/django-facebook-6.0.6.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion django_facebook/admin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.contrib import admin
from django.conf import settings
from django.core.urlresolvers import reverse
from django.urls import reverse
from django_facebook import admin_actions
from django_facebook import models
from django_facebook import settings as facebook_settings
Expand Down
6 changes: 3 additions & 3 deletions django_facebook/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ class FacebookProfile(FacebookProfileModel):
Use this by setting
AUTH_PROFILE_MODULE = 'django_facebook.FacebookProfile'
'''
user = models.OneToOneField(get_user_model_setting())
user = models.OneToOneField(get_user_model_setting(),on_delete=models.CASCADE)

if getattr(settings, 'AUTH_USER_MODEL', None) == 'django_facebook.FacebookCustomUser':
try:
Expand Down Expand Up @@ -510,7 +510,7 @@ class OpenGraphShare(BaseModel):
'''
objects = model_managers.OpenGraphShareManager()

user = models.ForeignKey(get_user_model_setting())
user = models.ForeignKey(get_user_model_setting(),on_delete=models.CASCADE)

# domain stores
action_domain = models.CharField(max_length=255)
Expand All @@ -519,7 +519,7 @@ class OpenGraphShare(BaseModel):
# what we are sharing, dict and object
share_dict = models.TextField(blank=True, null=True)

content_type = models.ForeignKey(ContentType, blank=True, null=True)
content_type = models.ForeignKey(ContentType, blank=True, null=True,on_delete=models.CASCADE)
object_id = models.PositiveIntegerField(blank=True, null=True)
content_object = GenericForeignKey('content_type', 'object_id')

Expand Down