django-rest-framework icon indicating copy to clipboard operation
django-rest-framework copied to clipboard

docs - Getting Started - Model Views

Open lduguid opened this issue 15 years ago • 3 comments

url(r'^([0-9]+)/$', InstanceModelView.as_view(resource=MyModelResource)),

should be

url(r'^(?P[0-9]+)/$', InstanceModelView.as_view(resource=MyModelResource)),

to avoid 'NoReverseMatch' Error

Cheers

p.s. Not sure why but the issue edit box seems to not display (?P[0-9]+) correctly, there should be "less than id greater than" between the 'P' and '['. However if I go to 'update issue' it is still there, some meta/escape code weirdness shrug

lduguid avatar Jun 30 '11 17:06 lduguid

Apparently you can escape the < > symbols with a backslash. So I took the liberty of changing the original description.

markotibold avatar Jun 30 '11 17:06 markotibold

Hey Iduguid, thanks for pointing that out. It really helps when people spot bugs in the docs to report them.

This issue is already solved in the main repo. It's only that the docs at http://django-rest-framework.org/ are a little outdated.

Hopefully they will be updated soon.

markotibold avatar Jun 30 '11 18:06 markotibold

Hey folks. Main site's updated now. Thanks again Iduguid!

lovelydinosaur avatar Jul 01 '11 10:07 lovelydinosaur