Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from OpenUpSA/pippable
Make indigo pip-installable
- Loading branch information
Showing
36 changed files
with
587 additions
and
468 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
include LICENSE | ||
include README.md | ||
include VERSION | ||
|
||
recursive-include locale * | ||
recursive-include indigo_api/fixtures * | ||
recursive-include indigo_api/static * | ||
recursive-include indigo_api/templates * | ||
|
||
recursive-include indigo_app/static * | ||
recursive-include indigo_app/templates * | ||
|
||
recursive-include indigo_resolver/static * | ||
recursive-include indigo_resolver/templates * | ||
|
||
recursive-include indigo_pl/static * | ||
recursive-include indigo_pl/templates * | ||
recursive-include indigo_za/static * | ||
recursive-include indigo_za/templates * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.8 on 2018-07-28 16:11 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('indigo_api', '0053_work_view_perm'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='document', | ||
options={'permissions': (('publish_document', 'Can publish and edit non-draft documents'), ('view_published_document', 'Can view publish documents through the API'))}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.8 on 2018-07-30 19:37 | ||
from __future__ import unicode_literals | ||
import datetime | ||
|
||
from django.db import migrations | ||
|
||
|
||
def ensure_expression_dates(apps, schema_editor): | ||
Work = apps.get_model("indigo_api", "Work") | ||
Document = apps.get_model("indigo_api", "Document") | ||
db_alias = schema_editor.connection.alias | ||
|
||
default_date = datetime.date(1980, 1, 1) | ||
|
||
for document in Document.objects.filter(expression_date=None).using(db_alias).all(): | ||
document.expression_date = document.work.publication_date or datetime | ||
document.save() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('indigo_api', '0054_view_published_doc_perms'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(ensure_expression_dates, migrations.RunPython.noop), | ||
] |
20 changes: 20 additions & 0 deletions
20
indigo_api/migrations/0056_doc_requires_expression_date.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.8 on 2018-07-30 19:42 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('indigo_api', '0055_document_expression_dates'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='document', | ||
name='expression_date', | ||
field=models.DateField(help_text=b'Date of publication or latest amendment'), | ||
), | ||
] |
Oops, something went wrong.