Browse Source

Add misago.threads.admin package

rafalp 6 years ago
parent
commit
1ab3ea1cea

+ 2 - 2
misago/threads/admin.py → misago/threads/admin/__init__.py

@@ -1,8 +1,8 @@
 from django.conf.urls import url
 from django.conf.urls import url
 from django.utils.translation import gettext_lazy as _
 from django.utils.translation import gettext_lazy as _
 
 
-from .views.admin.attachments import AttachmentsList, DeleteAttachment
-from .views.admin.attachmenttypes import (
+from .views.attachments import AttachmentsList, DeleteAttachment
+from .views.attachmenttypes import (
     AttachmentTypesList,
     AttachmentTypesList,
     DeleteAttachmentType,
     DeleteAttachmentType,
     EditAttachmentType,
     EditAttachmentType,

+ 1 - 1
misago/threads/forms.py → misago/threads/admin/forms.py

@@ -1,7 +1,7 @@
 from django import forms
 from django import forms
 from django.utils.translation import gettext as _
 from django.utils.translation import gettext as _
 
 
-from .models import AttachmentType
+from ..models import AttachmentType
 
 
 
 
 def get_searchable_filetypes():
 def get_searchable_filetypes():

+ 0 - 0
misago/threads/views/admin/__init__.py → misago/threads/admin/tests/__init__.py


+ 3 - 3
misago/threads/tests/test_attachmenttypeadmin_views.py → misago/threads/admin/tests/test_attachment_types_views.py

@@ -1,8 +1,8 @@
 from django.urls import reverse
 from django.urls import reverse
 
 
-from ...acl.models import Role
-from ...admin.test import AdminTestCase
-from ..models import AttachmentType
+from ....acl.models import Role
+from ....admin.test import AdminTestCase
+from ...models import AttachmentType
 
 
 
 
 class AttachmentTypeAdminViewsTests(AdminTestCase):
 class AttachmentTypeAdminViewsTests(AdminTestCase):

+ 4 - 4
misago/threads/tests/test_attachmentadmin_views.py → misago/threads/admin/tests/test_attachments_views.py

@@ -1,9 +1,9 @@
 from django.urls import reverse
 from django.urls import reverse
 
 
-from .. import test
-from ...admin.test import AdminTestCase
-from ...categories.models import Category
-from ..models import Attachment, AttachmentType
+from ... import test
+from ....admin.test import AdminTestCase
+from ....categories.models import Category
+from ...models import Attachment, AttachmentType
 
 
 
 
 class AttachmentAdminViewsTests(AdminTestCase):
 class AttachmentAdminViewsTests(AdminTestCase):

+ 0 - 0
misago/threads/admin/views/__init__.py


+ 1 - 1
misago/threads/views/admin/attachments.py → misago/threads/admin/views/attachments.py

@@ -3,8 +3,8 @@ from django.db import transaction
 from django.utils.translation import gettext_lazy as _
 from django.utils.translation import gettext_lazy as _
 
 
 from ....admin.views import generic
 from ....admin.views import generic
-from ...forms import FilterAttachmentsForm
 from ...models import Attachment, Post
 from ...models import Attachment, Post
+from ..forms import FilterAttachmentsForm
 
 
 
 
 class AttachmentAdmin(generic.AdminBaseMixin):
 class AttachmentAdmin(generic.AdminBaseMixin):

+ 1 - 1
misago/threads/views/admin/attachmenttypes.py → misago/threads/admin/views/attachmenttypes.py

@@ -3,8 +3,8 @@ from django.db.models import Count
 from django.utils.translation import gettext_lazy as _
 from django.utils.translation import gettext_lazy as _
 
 
 from ....admin.views import generic
 from ....admin.views import generic
-from ...forms import AttachmentTypeForm
 from ...models import AttachmentType
 from ...models import AttachmentType
+from ..forms import AttachmentTypeForm
 
 
 
 
 class AttachmentTypeAdmin(generic.AdminBaseMixin):
 class AttachmentTypeAdmin(generic.AdminBaseMixin):