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

Django42 without configs #194

Closed
wants to merge 6 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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [django32, django40]
toxenv: [django32, django42]
steps:
- uses: actions/checkout@v1
- name: setup python
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@ def is_requirement(line):
'Framework :: Django',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Framework :: Django',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.2',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries :: Application Frameworks',
Expand Down
Binary file removed testproject/testproject/db/prepopulated.db
Binary file not shown.
13 changes: 7 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[tox]
envlist = py38-django{32,40}
envlist = py38-django{32, 42}

[testenv]
deps =
deps =
django32: -r requirements/django.txt
django40: django>4.0,<4.1
-r{toxinidir}/requirements/test.txt
changedir={toxinidir}/testproject/
commands =
django42: Django>=4.2,<4.3
-r{toxinidir}/requirements/test.txt
changedir = {toxinidir}/testproject/
commands =
pytest --cov wiki --cov django_notify

4 changes: 3 additions & 1 deletion wiki/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ class URLPathAdmin(MPTTModelAdmin):
'articles__article__modified')
list_display = ('__unicode__', 'article', 'get_created')

@admin.display(
description=_('created')
)
def get_created(self, instance):
return instance.article.created
get_created.short_description = _('created')


admin.site.register(models.URLPath, URLPathAdmin)
Expand Down
25 changes: 25 additions & 0 deletions wiki/migrations/0007_alter_articleforobject_content_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Generated by Django 4.2 on 2023-08-05 16:53

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('contenttypes', '0002_remove_content_type_name'),
('wiki', '0006_auto_20200110_1003'),
]

operations = [
migrations.AlterField(
model_name='articleforobject',
name='content_type',
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name='content_type_set_for_%(class)s',
to='contenttypes.contenttype',
verbose_name='content type'
),
),
]
2 changes: 1 addition & 1 deletion wiki/plugins/attachments/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
default_app_config = 'wiki.apps.AttachmentsConfig'
default_app_config = 'wiki.apps.AttachmentsConfig'
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 4.2 on 2023-08-06 09:43

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('attachments', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='attachment',
name='current_revision',
field=models.OneToOneField(blank=True, help_text='The revision of this attachment currently in use (on all articles using the attachment)', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='current_set', to='attachments.attachmentrevision', verbose_name='current revision'),
),
migrations.AlterField(
model_name='attachmentrevision',
name='attachment',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='attachments.attachment'),
),
migrations.AlterField(
model_name='attachmentrevision',
name='previous_revision',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='attachments.attachmentrevision'),
),
]
1 change: 0 additions & 1 deletion wiki/plugins/images/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
default_app_config = 'wiki.apps.ImagesConfig'
19 changes: 19 additions & 0 deletions wiki/plugins/images/migrations/0002_alter_imagerevision_image.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 4.2 on 2023-08-06 09:43

from django.db import migrations, models
import wiki.plugins.images.models


class Migration(migrations.Migration):

dependencies = [
('images', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='imagerevision',
name='image',
field=models.ImageField(blank=True, height_field='height', max_length=2000, null=True, upload_to=wiki.plugins.images.models.upload_path, width_field='width'),
),
]
5 changes: 1 addition & 4 deletions wiki/plugins/notifications/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
default_app_config = 'wiki.apps.NotifcationsConfig'

# Key for django_notify
ARTICLE_EDIT = "article_edit"
ARTICLE_EDIT = "article_edit"
Loading