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

Support Django 3 #463

Open
wants to merge 1 commit into
base: dev
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion jet/dashboard/models.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
from importlib import import_module
import json
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from jet.utils import LazyDateTimeEncoder

try:
from django.utils.encoding import python_2_unicode_compatible
except ImportError:
from six import python_2_unicode_compatible

@python_2_unicode_compatible
class UserDashboardModule(models.Model):
Expand Down
2 changes: 1 addition & 1 deletion jet/dashboard/templates/admin/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "admin/base_site.html" %}
{% load i18n admin_static jet_dashboard_tags static %}
{% load i18n static jet_dashboard_tags static %}

{% block html %}{% get_dashboard 'index' as dashboard %}{{ block.super }}{% endblock %}

Expand Down
5 changes: 4 additions & 1 deletion jet/models.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from django.db import models
from django.utils import timezone
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _

try:
from django.utils.encoding import python_2_unicode_compatible
except ImportError:
from six import python_2_unicode_compatible

@python_2_unicode_compatible
class Bookmark(models.Model):
Expand Down
2 changes: 1 addition & 1 deletion jet/templates/admin/edit_inline/compact.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load i18n admin_urls admin_static %}
{% load i18n admin_urls static %}

<div class="inline-group compact" id="{{ inline_admin_formset.formset.prefix }}-group" data-inline-prefix="{{ inline_admin_formset.formset.prefix }}" data-inline-verbose-name="{{ inline_admin_formset.opts.verbose_name|capfirst }}" data-inline-delete-text="{% trans "Remove" %}">
<h2>{{ inline_admin_formset.opts.verbose_name_plural|capfirst }}</h2>
Expand Down
2 changes: 1 addition & 1 deletion jet/templates/rangefilter/date_filter.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load i18n admin_static %}
{% load i18n static %}
<h3>{% blocktrans with filter_title=title %} By {{ filter_title }} {% endblocktrans %}</h3>
<script>
function datefilter_apply(event, qs_name, form_name){
Expand Down
5 changes: 4 additions & 1 deletion jet/tests/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from django.db import models
from django.utils.encoding import python_2_unicode_compatible

try:
from django.utils.encoding import python_2_unicode_compatible
except ImportError:
from six import python_2_unicode_compatible

@python_2_unicode_compatible
class TestModel(models.Model):
Expand Down