-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- sapelli_project_list.html: new info dialogue; - no longer generating automatic descriptions on newly uploaded Sapelli projects, also added migration to remove them from existing ones; - added js-cookie/js.cookie.min.js library (so we can remove it again from geokey); - fixed MANIFEST.in paths. Signed-off-by: Matthias Stevens <matthias.stevens@gmail.com>
- Loading branch information
1 parent
cb6f5a2
commit 49a600c
Showing
6 changed files
with
88 additions
and
8 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
include README.rst | ||
include LICENSE | ||
recursive-include geokey_extension/templates * | ||
recursive-include geokey_sapelli/static * | ||
recursive-include geokey_sapelli/templates * | ||
recursive-exclude travis * |
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
26 changes: 26 additions & 0 deletions
26
geokey_sapelli/migrations/0015_remove_automatic_descriptions.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,26 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
def remove_automatic_descriptions(apps, schema_editor): | ||
SapelliProject = apps.get_model('geokey_sapelli', 'SapelliProject') | ||
for sapelli_project in SapelliProject.objects.all(): | ||
auto_descr = 'Sapelli project id: %s;\nSapelli project fingerprint: %s;' % ( | ||
sapelli_project.sapelli_id, | ||
sapelli_project.sapelli_fingerprint) | ||
if sapelli_project.geokey_project.description == auto_descr: | ||
sapelli_project.geokey_project.description = '' | ||
sapelli_project.geokey_project.save() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('geokey_sapelli', '0014_fix_everyone_contributes'), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(remove_automatic_descriptions), | ||
] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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