-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(django): Add partial support for Django v4
- Loading branch information
1 parent
a57fa8e
commit a9dbfc4
Showing
16 changed files
with
57 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,7 @@ | ||
import os | ||
|
||
ADMINS = ( | ||
# ('Your Name', '[email protected]'), | ||
) | ||
|
||
DEBUG = True | ||
|
||
MANAGERS = ADMINS | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
|
@@ -20,13 +14,9 @@ | |
} | ||
|
||
TIME_ZONE = 'UTC' | ||
|
||
LANGUAGE_CODE = 'en' | ||
|
||
USE_I18N = True | ||
|
||
USE_L10N = True | ||
|
||
USE_TZ = True | ||
|
||
LOCALE_PATHS = [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import django.dispatch | ||
from django.dispatch import Signal | ||
|
||
pre_moderation = django.dispatch.Signal(providing_args=['instance', 'status']) | ||
# Arguments: "instance", "status" | ||
pre_moderation = Signal() | ||
|
||
post_moderation = django.dispatch.Signal(providing_args={'instance', 'status'}) | ||
# Arguments: "instance", "status" | ||
post_moderation = Signal() | ||
|
||
pre_many_moderation = django.dispatch.Signal( | ||
providing_args={'queryset', 'status', 'by', 'reason'} | ||
) | ||
# Arguments: "queryset", "status", "by", "reason" | ||
pre_many_moderation = Signal() | ||
|
||
post_many_moderation = django.dispatch.Signal( | ||
providing_args={'queryset', 'status', 'by', 'reason'} | ||
) | ||
# Arguments: "queryset", "status", "by", "reason" | ||
post_many_moderation = Signal() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
{% spaceless %} | ||
{% for operation in diff_operations %} | ||
{% ifequal operation.operation "replace" %} | ||
{% if operation.operation == "replace" %} | ||
<del class="diff modified">{{ operation.deleted }}</del> | ||
<ins class="diff modified">{{ operation.inserted }}</ins> | ||
{% endifequal %} | ||
{% ifequal operation.operation "delete" %} | ||
{% endif %} | ||
|
||
{% if operation.operation == "delete" %} | ||
<del class="diff">{{ operation.deleted }}</del> | ||
{% endifequal %} | ||
{% ifequal operation.operation "insert" %} | ||
{% endif %} | ||
|
||
{% if operation.operation == "insert" %} | ||
<ins class="diff">{{ operation.inserted }}</ins> | ||
{% endifequal %} | ||
{% ifequal operation.operation "equal" %} | ||
{% endif %} | ||
|
||
{% if operation.operation == "equal" %} | ||
<span>{{ operation.inserted }}</span> | ||
{% endifequal %} | ||
{% endif %} | ||
{% endfor %} | ||
{% endspaceless %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{{ content_type }} entry has been {% ifequal moderated_object.status 0 %}rejected{% endifequal %}{% ifequal moderated_object.status 1 %}accepted{% endifequal %} | ||
{{ content_type }} entry has been {% if moderated_object.status == 0 %}rejected{% endif %}{% if moderated_object.status == 1 %}accepted{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters