# Path: radioco/apps/users/models.py
# class UserProfile(models.Model):
#     user = models.OneToOneField(User, unique=True)
#     bio = RichTextUploadingField(blank=True, verbose_name=_("biography"))
#     avatar = models.ImageField(
#         upload_to='avatars/', default='defaults/default-userprofile-avatar.jpg', verbose_name=_("avatar")
#     )
#     display_personal_page = models.BooleanField(default=False, verbose_name=_("display personal page"))
#     slug = models.SlugField(max_length=30)
# 
#     def get_absolute_url(self):
#         return reverse('users:detail', args=[self.slug])
# 
#     def save(self, *args, **kwargs):
#         if not self.pk:
#             try:
#                 p = UserProfile.objects.get(user=self.user)
#                 self.pk = p.pk
#             except UserProfile.DoesNotExist:
#                 pass
#         self.slug = slugify(self.user.username)
#         super(UserProfile, self).save(*args, **kwargs)
# 
#     class Meta:
#         default_permissions = ('change',)
#         verbose_name = _('user profile')
#         verbose_name_plural = _('user profile')
# 
#     def __str__(self):
#         return "%s's profile" % self.user


import re
from django import forms
from django.conf.urls import url
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from django.core import validators
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from radioco.apps.users.models import UserProfile
    from django.utils.encoding import force_unicode
    from django.utils.encoding import force_text as force_unicode
# Radioco - Broadcasting Radio Recording Scheduling system.
# Copyright (C) 2014  Iago Veloso Abalo
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.





try:
except ImportError:


# USER

class UserProfileInline(admin.StackedInline):
    inline_classes = ('grp-collapse grp-open',)
    extra = 1

# Path: radioco/apps/users/models.py
# class UserProfile(models.Model):
#     user = models.OneToOneField(User, unique=True)
#     bio = RichTextUploadingField(blank=True, verbose_name=_("biography"))
#     avatar = models.ImageField(
#         upload_to='avatars/', default='defaults/default-userprofile-avatar.jpg', verbose_name=_("avatar")
#     )
#     display_personal_page = models.BooleanField(default=False, verbose_name=_("display personal page"))
#     slug = models.SlugField(max_length=30)
# 
#     def get_absolute_url(self):
#         return reverse('users:detail', args=[self.slug])
# 
#     def save(self, *args, **kwargs):
#         if not self.pk:
#             try:
#                 p = UserProfile.objects.get(user=self.user)
#                 self.pk = p.pk
#             except UserProfile.DoesNotExist:
#                 pass
#         self.slug = slugify(self.user.username)
#         super(UserProfile, self).save(*args, **kwargs)
# 
#     class Meta:
#         default_permissions = ('change',)
#         verbose_name = _('user profile')
#         verbose_name_plural = _('user profile')
# 
#     def __str__(self):
#         return "%s's profile" % self.user


# Path: radioco/apps/users/admin.py
import re
from django import forms
from django.conf.urls import url
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from django.core import validators
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from radioco.apps.users.models import UserProfile
    from django.utils.encoding import force_unicode
    from django.utils.encoding import force_text as force_unicode

# Radioco - Broadcasting Radio Recording Scheduling system.
# Copyright (C) 2014  Iago Veloso Abalo
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.





try:
except ImportError:


# USER

class UserProfileInline(admin.StackedInline):
    inline_classes = ('grp-collapse grp-open',)
    extra = 1

    model = UserProfile