# Path: app_author/models.py
# class Profile(models.Model):
#     """
#     Author Model
#     """
#     user = models.OneToOneField(
#         User,
#         on_delete=models.CASCADE
#     )
# 
#     profile_picture = models.ImageField(
#         upload_to='images/%Y/%m/%d',
#         validators=[validate_image],
#         blank=True,
#         null=True
#     )
# 
#     profile_name = models.CharField(
#         verbose_name='Name',
#         null=True,
#         blank=True,
#         max_length=50
#     )
# 
#     profile_email = models.EmailField(
#         verbose_name='Email Address',
#         null=True,
#         blank=True
#     )
# 
#     profile_location = models.CharField(
#         verbose_name='Origin/City',
#         null=True,
#         blank=True,
#         max_length=50
#     )
# 
#     profile_github = models.URLField(
#         verbose_name='Github URL',
#         null=True,
#         blank=True
#     )
# 
#     slug = models.SlugField()
# 
#     is_created = models.DateTimeField(
#         null=True,
#         blank=True
#     )
# 
#     is_moderator = models.BooleanField(
#         default=False,
#     )
# 
#     def __str__(self):
#         return str(self.user)
# 
#     def save(self, **kwargs):
#         if not self.slug:
#             from djangoid.utils import get_unique_slug
#             self.slug = get_unique_slug(instance=self, field='profile_name')
#         super(Profile, self).save(**kwargs)


from django import forms
from .models import Profile



class ProfileForm(forms.ModelForm):
    """
    Author Form
    """
    class Meta:

# Path: app_author/models.py
# class Profile(models.Model):
#     """
#     Author Model
#     """
#     user = models.OneToOneField(
#         User,
#         on_delete=models.CASCADE
#     )
# 
#     profile_picture = models.ImageField(
#         upload_to='images/%Y/%m/%d',
#         validators=[validate_image],
#         blank=True,
#         null=True
#     )
# 
#     profile_name = models.CharField(
#         verbose_name='Name',
#         null=True,
#         blank=True,
#         max_length=50
#     )
# 
#     profile_email = models.EmailField(
#         verbose_name='Email Address',
#         null=True,
#         blank=True
#     )
# 
#     profile_location = models.CharField(
#         verbose_name='Origin/City',
#         null=True,
#         blank=True,
#         max_length=50
#     )
# 
#     profile_github = models.URLField(
#         verbose_name='Github URL',
#         null=True,
#         blank=True
#     )
# 
#     slug = models.SlugField()
# 
#     is_created = models.DateTimeField(
#         null=True,
#         blank=True
#     )
# 
#     is_moderator = models.BooleanField(
#         default=False,
#     )
# 
#     def __str__(self):
#         return str(self.user)
# 
#     def save(self, **kwargs):
#         if not self.slug:
#             from djangoid.utils import get_unique_slug
#             self.slug = get_unique_slug(instance=self, field='profile_name')
#         super(Profile, self).save(**kwargs)


# Path: app_author/forms.py
from django import forms
from .models import Profile




class ProfileForm(forms.ModelForm):
    """
    Author Form
    """
    class Meta:

        model = Profile