Skip to content

Commit

Permalink
add migrations and app_label
Browse files Browse the repository at this point in the history
  • Loading branch information
agrausem committed Nov 20, 2015
1 parent 79a7826 commit 76c7b6d
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def recursive_requirements(requirement_file, libs, links, path=''):

setup(
name = "django-workflow-activity",
version = "1.0.7",
version = "1.0.8",
packages = find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]),

install_requires=libraries,
Expand Down
11 changes: 10 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py27-dj17,py34-dj17
py27-dj17,py34-dj17,py27-dj18,py34-dj18



Expand All @@ -18,6 +18,15 @@ deps =
basepython = python3.4
deps = {[testenv:py27-dj17]deps}

[testenv:py27-dj18]
basepython = python2.7
deps =
{[testenv]deps}
django>1.8,<1.9

[testenv:py34-dj18]
basepython = python3.4
deps = {[testenv:py27-dj18]deps}

############
# Test env #
Expand Down
36 changes: 36 additions & 0 deletions workflow_activity/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
from django.conf import settings


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('contenttypes', '0001_initial'),
('workflows', '__first__'),
]

operations = [
migrations.CreateModel(
name='Action',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('process_date', models.DateTimeField(auto_now_add=True, verbose_name='Creation date')),
('creation_date', models.DateTimeField(auto_now_add=True, verbose_name='Date of creation')),
('object_id', models.PositiveIntegerField()),
('actor', models.ForeignKey(related_name='workflow_actions', verbose_name='Actor', to=settings.AUTH_USER_MODEL, null=True)),
('content_type', models.ForeignKey(to='contenttypes.ContentType')),
('previous_state', models.ForeignKey(related_name='+', verbose_name='Previous state', to='workflows.State')),
('transition', models.ForeignKey(related_name='+', verbose_name='Transition', to='workflows.Transition')),
('workflow', models.ForeignKey(related_name='+', verbose_name='Workflow', to='workflows.Workflow')),
],
options={
'verbose_name': 'Action',
'verbose_name_plural': 'Actions',
},
bases=(models.Model,),
),
]
Empty file.
1 change: 1 addition & 0 deletions workflow_activity/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class Action(models.Model):
class Meta:
verbose_name = _('Action')
verbose_name_plural = _('Actions')
app_label = 'workflow_activity'

def actor_name(self):
return u'{0.first_name} {0.last_name}'.format(self.actor) \
Expand Down

0 comments on commit 76c7b6d

Please sign in to comment.