Fix MANIFEST.in
parent
09744c7f2a
commit
37c12b8ccb
|
|
@ -1 +1,2 @@
|
|||
recursive-include admin-confirm *
|
||||
recursive-include admin_confirm *
|
||||
recursive-exclude admin_confirm/tests *
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ from django.contrib.admin.options import TO_FIELD_VAR
|
|||
from django.utils.translation import gettext as _
|
||||
from django.contrib.admin import helpers
|
||||
from django.db.models import Model, ManyToManyField
|
||||
|
||||
from django.forms import ModelForm
|
||||
from admin_confirm.utils import snake_to_title_case
|
||||
|
||||
|
|
@ -208,7 +207,6 @@ class AdminConfirmMixin:
|
|||
save_action = key
|
||||
break
|
||||
|
||||
|
||||
title_action = _("adding") if add else _("changing")
|
||||
|
||||
context = {
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ from django.contrib.auth.models import User
|
|||
from django.urls import reverse
|
||||
|
||||
|
||||
from tests.market.admin import InventoryAdmin, ShoppingMallAdmin
|
||||
from tests.market.models import Item, Inventory, ShoppingMall
|
||||
from tests.factories import ItemFactory, ShopFactory, InventoryFactory
|
||||
from tests.market.admin import ShoppingMallAdmin
|
||||
from tests.market.models import ShoppingMall
|
||||
from tests.factories import ShopFactory
|
||||
|
||||
|
||||
class TestConfirmChangeAndAddM2MField(TestCase):
|
||||
|
|
@ -28,6 +28,7 @@ class TestConfirmChangeAndAddM2MField(TestCase):
|
|||
self.assertEqual(response.status_code, 302)
|
||||
self.assertEqual(response.url, "/admin/market/shoppingmall/")
|
||||
self.assertEqual(ShoppingMall.objects.count(), 1)
|
||||
self.assertEqual(ShoppingMall.objects.all().first().shops.count(), 3)
|
||||
|
||||
def test_post_add_with_confirm_add_m2m(self):
|
||||
ShoppingMallAdmin.confirmation_fields = ["shops"]
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -6,7 +6,7 @@ README = open(os.path.join(here, "README.md")).read()
|
|||
|
||||
setup(
|
||||
name="django-admin-confirm",
|
||||
version="0.2.3",
|
||||
version="0.2.3.dev1",
|
||||
packages=["admin_confirm"],
|
||||
description="Adds confirmation to Django Admin changes, additions and actions",
|
||||
long_description_content_type="text/markdown",
|
||||
|
|
|
|||
Loading…
Reference in New Issue