This would be more readable if you used the `str.format()` syntax:

```python
course = world.scenario_dict["COURSE"]
path = "/courses/{org}/{num}/{name}/courseware/{chapter}/{section}".format(
    org=course.org, num=course.num, name=course.display_name.replace(' ', '_'),
    chapter=chapter_name, section=section_name)
url = django_url(path)
```