Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 7 additions & 4 deletions pmaweb/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading