0xE111 / django-mptt-urls

Creating hierarchical URLs in Django associated with django-MPTT models
MIT License
36 stars 5 forks source link

Request to update Documentation for view routing #10

Closed FFX01 closed 8 years ago

FFX01 commented 8 years ago

I think it may be a good idea to note in the docs that the model.get_absolute_url() function needs to be modified from the example if the user is using namespaced url routing.

For instance, I am building a cms using your django-mptt-urls. I have a page model with the following:

def get_absolute_url(self):
            return reverse(
                'page:page_view',
                kwargs={
                    'path': self.get_path()
                }
            )

I had to add the namespace for my app in order for the method to work properly. I feel kind of dumb, but it took me a bit to figure out that that was the problem. If you would like, I can make a pull request and modify the readme myself.

Let me know.

0xE111 commented 8 years ago

Hello. Sorry for late answer. I personally don't think it's an issue because usage of reverse is described in django documentation and there's nothing special about that.

However, I updated the documentation (166fe6168a117d127d12593361f5b3d47132fbb1) and hope one day it will help someone. Thanks you!