mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-01-24 00:04:13 +03:00
Added @models.permalink decorator to User.get_absolute_url() method
This commit is contained in:
parent
23042b0956
commit
f073fb6ab5
|
@ -3,6 +3,8 @@ All enhancements and patches to cookiecutter-django will be documented in this f
|
|||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## [2015-07-17]
|
||||
### Added
|
||||
- @models.permalink decorator to User.get_absolute_url() method
|
||||
### Fixed
|
||||
- Broken user_form.html (@pydanny)
|
||||
|
||||
|
|
|
@ -16,5 +16,6 @@ class User(AbstractUser):
|
|||
def __unicode__(self):
|
||||
return self.username
|
||||
|
||||
@models.permalink
|
||||
def get_absolute_url(self):
|
||||
return reverse('users:detail', kwargs={'username': self.username})
|
||||
|
|
Loading…
Reference in New Issue
Block a user