Skip to content

Django 2.0 support #5

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ matrix:
python: "3.5"
- env: PACKAGES="django>=1.10.0,<1.11.0"
python: "3.5"
- env: PACKAGES="django>=1.11.0,<1.12.0"
- env: PACKAGES="django>=1.11.0,<2.1.0"
python: "3.6"
before_install:
- pip install codecov
Expand Down
6 changes: 3 additions & 3 deletions fluent_utils/softdeps/comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ class Meta:
objects = CommentManagerStub()

# add fields so ORM queries won't cause any issues.
content_type = models.ForeignKey(ContentType)
content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE)
object_pk = models.TextField()
content_object = GenericForeignKey(ct_field="content_type", fk_field="object_pk")
site = models.ForeignKey(Site)
site = models.ForeignKey(Site, on_delete=models.CASCADE)

user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name="%(class)s_comments")
user = models.ForeignKey(settings.AUTH_USER_MODEL, related_name="%(class)s_comments", on_delete=models.CASCADE)
user_name = models.CharField(max_length=50, blank=True)
user_email = models.EmailField(blank=True)
user_url = models.URLField(blank=True)
Expand Down
5 changes: 4 additions & 1 deletion fluent_utils/softdeps/fluent_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
HAS_APP_URLS = True
else:
# Use the stubs
from django.core.urlresolvers import reverse
try:
from django.core.urlresolvers import reverse
except ImportError:
from django.urls import reverse
from fluent_utils.django_compat import is_installed

try:
Expand Down