Questions

NoReverseMatch at /users/ Reverse for ‘user-detail’ with arguments

0

NoReverseMatch at /users/ Reverse for ‘user-detail’ with arguments ‘(2, u’abishek.mohan26’)’ not found. 1 pattern(s) tried: [‘users/(?P\d+)/(?P[-\w]+)/$’]

no reverse error



asked 1 year, 11 months ago
Reputation: 1





1 Answer

0

The error is coming because of dot(.) in the username which is not handled by regular epression in urls.py.

Regular expression with numbers, letters and dot(.)

(?P<username>[\w.-]+)

This should work fine.

Thanks.

answered 1 year, 11 months ago
Reputation: 1





Your Answer

Nothing to preview

Post Answer



Asked:  1 year, 11 months ago
Viewed:  1039 times
Active:  1 year, 11 months ago