geopuzzle
geopuzzle copied to clipboard
Use namespaces for urls
Refactor
path('<name>/questions/', PuzzleQuestionView.as_view(), name='puzzle_questions'),
to
path('puzzle/', include('puzzle.urls', namespace='puzzle')),
path('<name>/questions/', PuzzleQuestionView.as_view(), name='questions'),
Can I work on this issue?
yep, sure :) it should be easy
yep, sure :) it should be easy
Assign me please.
@TyVik can you explain me a little bit.
The main things - use https://docs.djangoproject.com/en/3.2/topics/http/urls/#url-namespaces.
I have 2 places for that - puzzle/
and quiz/
in https://github.com/TyVik/geopuzzle/blob/develop/mercator/urls.py#L39. Just:
- add namespace in include
- update the linked
urls.py
- special case in https://github.com/TyVik/geopuzzle/blob/a33eeaf2ce04b24cc5160c6f4444fb1910e3fdc7/maps/models/game.py#L49
- update tests