mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-01-24 08:14: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/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
## [2015-07-17]
|
## [2015-07-17]
|
||||||
|
### Added
|
||||||
|
- @models.permalink decorator to User.get_absolute_url() method
|
||||||
### Fixed
|
### Fixed
|
||||||
- Broken user_form.html (@pydanny)
|
- Broken user_form.html (@pydanny)
|
||||||
|
|
||||||
|
|
|
@ -16,5 +16,6 @@ class User(AbstractUser):
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return self.username
|
return self.username
|
||||||
|
|
||||||
|
@models.permalink
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
return reverse('users:detail', kwargs={'username': self.username})
|
return reverse('users:detail', kwargs={'username': self.username})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user