<commit_before>from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.db import models
from django.utils.encoding import python_2_unicode_compatible


class {{ cookiecutter.model_name }}(models.Model):
    name = models.CharField(max_length=255)

    @python_2_unicode_compatible
    def __str__(self):
        return '{{ cookiecutter.model_name }} ({})'.format(self.id or 'Unsaved')

    def get_absolute_url(self):
        return reverse('{{ cookiecutter.model_name|lower }}_detail', args=[str(self.id)])
<commit_msg>fix model template to use decorator over model, not the __str__ method<commit_after>from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.db import models
from django.utils.encoding import python_2_unicode_compatible


@python_2_unicode_compatible
class {{ cookiecutter.model_name }}(models.Model):
    name = models.CharField(max_length=255)

    def __str__(self):
        return '{{ cookiecutter.model_name }} ({})'.format(self.id or 'Unsaved')

    def get_absolute_url(self):
        return reverse('{{ cookiecutter.model_name|lower }}_detail', args=[str(self.id)])

{'fraction_non_alphanumeric': 0.10808510638297872, 'fraction_numerical': 0.00851063829787234, 'mean_word_length': 5.32258064516129, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '653074', 'n_tokens_mistral': 365, 'n_tokens_neox': 348, 'n_words': 83}