Skip to content

Commit f9a4c04

Browse files
authored
Merge pull request #95 from imomaliev/master
Do not ship tests and allow using StateLogManager in migrations
2 parents 9b4b62c + b314fad commit f9a4c04

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

django_fsm_log/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from django.conf import settings # noqa:F811
1+
from django.conf import settings # noqa: F811,F401
22
from appconf import AppConf
33

44

django_fsm_log/managers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def for_(self, obj):
1717

1818

1919
class StateLogManager(models.Manager):
20+
use_in_migrations = True
21+
2022
def get_queryset(self):
2123
return StateLogQuerySet(self.model)
2224

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Generated by Django 2.1.5 on 2019-01-31 03:41
2+
3+
from django.db import migrations
4+
import django_fsm_log.managers
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('django_fsm_log', '0003_statelog_description_squashed_0005_description_null'),
11+
]
12+
13+
operations = [
14+
migrations.AlterModelManagers(
15+
name='statelog',
16+
managers=[
17+
('objects', django_fsm_log.managers.StateLogManager()),
18+
],
19+
),
20+
]

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def readfile(filename):
1818
author_email='[email protected]',
1919
url='https://github.com/gizmag/django-fsm-log',
2020
license='MIT',
21-
packages=find_packages(),
21+
packages=find_packages(exclude=['tests']),
2222
install_requires=['django>=1.8', 'django_fsm>=2', 'django_appconf'],
2323
extras_require={
2424
'testing': [

0 commit comments

Comments
 (0)