Skip to content

Commit

Permalink
Merge pull request #973 from makinacorpus/various_fixes_v0.22
Browse files Browse the repository at this point in the history
Various fixes v0.22
  • Loading branch information
leplatrem committed Mar 6, 2014
2 parents f9b9074 + 5782640 commit ce45e58
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ CHANGELOG
-------------------

* Fix install.sh not compiling locale messages (fixes #965)
* Moved trek completeness fields to setting `TREK_COMPLETENESS_FIELDS`. Duration
and difficulty were added, arrival was removed (fixes #967)
* Fix regression about source locale messages (fixes #970)
* Fix regression link `Back to application` lost from adminsite (fixes #971)
* Serve uploaded files as attachments (fixes #972)
* Remove help texts being shown from filter forms (fixes #966)
* Fix form pills for translated languages (fixes #968)

0.22.3 (2014-02-17)
-------------------
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ all_makemessages: install

all_compilemessages: install
for dir in `find geotrek/ -type d -name locale`; do pushd `dirname $$dir` > /dev/null; $(ROOT_DIR)/bin/django-admin compilemessages; popd > /dev/null; done
for dir in `find lib/src/ -type d -name locale`; do pushd `dirname $$dir` > /dev/null; $(root)/bin/django-admin compilemessages; popd > /dev/null; done



Expand Down
2 changes: 1 addition & 1 deletion conf/buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ screamshotter = git https://github.com/makinacorpus/django-screamshot.git branch
convertit = git https://github.com/makinacorpus/convertit.git rev=0b537dee184da67e7cd5d07d48f8b65968684ad2
paperclip = git https://github.com/makinacorpus/django-paperclip.git
# Still under development
mapentity = git https://github.com/makinacorpus/Geotrek.git rev=3df01890cfbd0ff44d7f040d38778f078cd0c967
mapentity = git https://github.com/makinacorpus/Geotrek.git rev=68bcb6425cd654bf4f76d767a2367e070af656f2

[gdal-bindings]
recipe = zc.recipe.egg:custom
Expand Down
4 changes: 3 additions & 1 deletion conf/settings.ini.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
#..........................
#
# (Note: If you edit this file out of install process,
# re-run "./install.sh" to apply changes)
# re-run "./install.sh" to apply changes.
# Running "make env_standalone deploy" is faster and might be enough
# depending on the entries you modified...)

[settings]

Expand Down
4 changes: 2 additions & 2 deletions docs/deployment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ After editing ``etc/settings.ini``, refresh the running instance with :

::

make deploy
make env_standalone deploy


There a few cases where running ``install.sh`` would be necessary. If you
Expand Down Expand Up @@ -77,7 +77,7 @@ However, it is still possible to write a custom Django setting file.
[django]
settings = settings.custom

* As for any change in settings, re-run ``make deploy``.
* As for any change in settings, re-run ``make env_standalone deploy``.


============
Expand Down
2 changes: 1 addition & 1 deletion geotrek/authent/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def login(self, user):
def test_user_cant_access(self):
self.login(self.user)
response = self.client.get('/admin/')
self.assertContains(response, 'Log in | Django site admin')
self.assertContains(response, 'Log in | Geotrek administration')

def test_admin_can_see_everything(self):
self.login(self.admin)
Expand Down
14 changes: 14 additions & 0 deletions geotrek/jstests/nav-custom-admin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var utils = require('./_nav-utils.js');

casper.test.begin('Adminsite', function(test) {

utils.setUp();

casper.start(utils.baseurl + '/admin/', function () {
test.assertTextExists('Back to application');
});

casper.run(function done() {
test.done();
});
});
2 changes: 2 additions & 0 deletions geotrek/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,8 @@
LAND_BBOX_DISTRICTS_ENABLED = True
LAND_BBOX_AREAS_ENABLED = False

TREK_COMPLETENESS_FIELDS = ['departure', 'duration', 'difficulty',
'description_teaser']
TREK_DAY_DURATION = 10 # Max duration to be done in one day

# Static offsets in projection units
Expand Down
3 changes: 3 additions & 0 deletions geotrek/settings/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
envini.get('host', section='screamshotter', default='127.0.0.1'),
envini.get('port', section='screamshotter', default='8001'))

# We override the default Adminsite template, add its location for template loader
TEMPLATE_DIRS += (os.path.join(DEPLOY_ROOT, 'lib', 'src', 'mapentity', 'mapentity', 'templates'),)


#
# Geotrek settings
Expand Down
2 changes: 1 addition & 1 deletion geotrek/trekking/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def kml(self):
def is_complete(self):
"""It should also have a description, etc.
"""
mandatory = ['departure', 'arrival', 'description_teaser']
mandatory = settings.TREK_COMPLETENESS_FIELDS
for f in mandatory:
if not getattr(self, f):
return False
Expand Down

0 comments on commit ce45e58

Please sign in to comment.