<commit_before>from django.db import models

# Create your models here.

from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from userena.models import UserenaBaseProfile
from taggit.managers import TaggableManager


from userena.managers import ASSIGNED_PERMISSIONS
from guardian.shortcuts import assign

class Profile(UserenaBaseProfile):
    user = models.OneToOneField(User,
                                unique=True,
                                verbose_name=_('user'),
                                related_name='profile')
    location = models.CharField(max_length=50,
                                null=True, blank=True,
                                help_text=_("City, Country, ..."))    
    about = models.TextField(null=True, blank=True,
                             help_text=_("A few words about you."))

    website = models.URLField(null=True, blank=True)
    twitter = models.CharField(max_length=100, null=True, blank=True,
                               help_text=_("Your twitter username"))
    
    skills = TaggableManager()

    @models.permalink
    def get_absolute_url(self):
        return ('profile-detail', [self.user.id])


# Fix for #14 , using http://stackoverflow.com/questions/12142195/django-userena-edit-profile-forbidden
from django.dispatch import receiver
from django.db.models.signals import post_save
@receiver(post_save, sender=User, dispatch_uid='user.created')
def user_created(sender, instance, created, raw, using, **kwargs):<commit_msg>blank true for tags<commit_after>from django.db import models

# Create your models here.

from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from userena.models import UserenaBaseProfile
from taggit.managers import TaggableManager


from userena.managers import ASSIGNED_PERMISSIONS
from guardian.shortcuts import assign

class Profile(UserenaBaseProfile):
    user = models.OneToOneField(User,
                                unique=True,
                                verbose_name=_('user'),
                                related_name='profile')
    location = models.CharField(max_length=50,
                                null=True, blank=True,
                                help_text=_("City, Country, ..."))    
    about = models.TextField(null=True, blank=True,
                             help_text=_("A few words about you."))

    website = models.URLField(null=True, blank=True)
    twitter = models.CharField(max_length=100, null=True, blank=True,
                               help_text=_("Your twitter username"))
    
    skills = TaggableManager(blank=True,)

    @models.permalink
    def get_absolute_url(self):
        return ('profile-detail', [self.user.id])


# Fix for #14 , using http://stackoverflow.com/questions/12142195/django-userena-edit-profile-forbidden
from django.dispatch import receiver
from django.db.models.signals import post_save
@receiver(post_save, sender=User, dispatch_uid='user.created')
def user_created(sender, instance, created, raw, using, **kwargs):
{'fraction_non_alphanumeric': 0.09511484956324814, 'fraction_numerical': 0.009705596894208994, 'mean_word_length': 2.6462264150943398, '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': '304995', 'n_tokens_mistral': 873, 'n_tokens_neox': 829, 'n_words': 192}