# Path: della/user_manager/models.py
# class UserProfile(TimeStampMixin):
#     """
#     To manage users and stuff. From default `User` we will use `username`,
#     `email`, `password`, `first_name` and `last_name`.
#     """
#     bio = models.TextField(null=True)
#     address = models.TextField(null=True)
#     shipping_instructions = models.TextField(null=True)
#     is_enabled_exchange = models.BooleanField(default=False)
#     preferences = models.TextField(null=True)
#     fb_profile_url = models.URLField(null=True)
#     twitter_profile_url = models.URLField(null=True)
#     website_url = models.URLField(null=True)
#     wishlist_url = models.URLField(null=True)
#     avatar = models.ImageField(
#         upload_to=avatar_file_name, default='avatar.png')
# 
#     user = models.OneToOneField(User, on_delete=models.CASCADE)
#     santee = models.OneToOneField(User, on_delete=models.CASCADE,  related_name='santa', null=True)
# 
#     def __str__(self):
#         return self.user.username


from django import forms
from django.forms import ModelForm
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from django.core.validators import RegexValidator, validate_email
from django.conf import settings
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit, Reset, Layout, Fieldset, HTML
from .models import UserProfile
        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset(
                'Update Your Profile',
                'avatar',
                'bio',
                'website_url',
                'fb_profile_url',
                'twitter_profile_url',
                'wishlist_url',
                HTML("""
                <hr /><p><span class="help-block">Below fields are only visible
                to your Santa</span></p>
                """),
                'first_name',
                'last_name',
                'preferences',
                'address',
                'shipping_instructions'
            )
        )
        self.helper.form_class = 'form-horizontal'
        self.helper.form_method = 'post'
        self.helper.form_action = 'user_manager:account'
        self.helper.label_class = 'col-lg-2'
        self.helper.field_class = 'col-lg-10'
        self.helper.add_input(Reset('reset', 'Cancel'))
        self.helper.add_input(Submit('submit', 'Submit'))

    class Meta:

# Path: della/user_manager/models.py
# class UserProfile(TimeStampMixin):
#     """
#     To manage users and stuff. From default `User` we will use `username`,
#     `email`, `password`, `first_name` and `last_name`.
#     """
#     bio = models.TextField(null=True)
#     address = models.TextField(null=True)
#     shipping_instructions = models.TextField(null=True)
#     is_enabled_exchange = models.BooleanField(default=False)
#     preferences = models.TextField(null=True)
#     fb_profile_url = models.URLField(null=True)
#     twitter_profile_url = models.URLField(null=True)
#     website_url = models.URLField(null=True)
#     wishlist_url = models.URLField(null=True)
#     avatar = models.ImageField(
#         upload_to=avatar_file_name, default='avatar.png')
# 
#     user = models.OneToOneField(User, on_delete=models.CASCADE)
#     santee = models.OneToOneField(User, on_delete=models.CASCADE,  related_name='santa', null=True)
# 
#     def __str__(self):
#         return self.user.username


# Path: della/user_manager/forms.py
from django import forms
from django.forms import ModelForm
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from django.core.validators import RegexValidator, validate_email
from django.conf import settings
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit, Reset, Layout, Fieldset, HTML
from .models import UserProfile

        self.helper = FormHelper()
        self.helper.layout = Layout(
            Fieldset(
                'Update Your Profile',
                'avatar',
                'bio',
                'website_url',
                'fb_profile_url',
                'twitter_profile_url',
                'wishlist_url',
                HTML("""
                <hr /><p><span class="help-block">Below fields are only visible
                to your Santa</span></p>
                """),
                'first_name',
                'last_name',
                'preferences',
                'address',
                'shipping_instructions'
            )
        )
        self.helper.form_class = 'form-horizontal'
        self.helper.form_method = 'post'
        self.helper.form_action = 'user_manager:account'
        self.helper.label_class = 'col-lg-2'
        self.helper.field_class = 'col-lg-10'
        self.helper.add_input(Reset('reset', 'Cancel'))
        self.helper.add_input(Submit('submit', 'Submit'))

    class Meta:

        model = UserProfile