diff --git a/README.rst b/README.rst index 940b6ab9..a055c3b9 100644 --- a/README.rst +++ b/README.rst @@ -83,15 +83,15 @@ You might want to import some data to have at least some content on the website: ./manage.py loaddata pmaweb/fixtures/test_data.json -Once you have all dependencies, you can start development server: +Once you have all dependencies, you can start the development server: .. code-block:: sh ./manage.py runserver -It will listed on port 8080 by default (you can change this by parameters). +It will listen on port 8000 by default (you can change this by parameters). -To run test-suite execute: +To run the test-suite execute: .. code-block:: sh diff --git a/pmaweb/context_processors.py b/pmaweb/context_processors.py index 99438f21..bfcb722d 100644 --- a/pmaweb/context_processors.py +++ b/pmaweb/context_processors.py @@ -60,10 +60,13 @@ def menu(request): else: urlname = 'home' - active = ( - request.resolver_match and - urlname == request.resolver_match.url_name - ) + if urlname == 'home': + active = request.path == reverse(urlname) + else: + active = ( + request.resolver_match and + request.path.startswith(reverse(urlname)) + ) result.append({ 'title': title,