from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.contrib.auth.models import User

# Create your models here.


class ActiveProfileManager(models.Manager):
    """A model manger limited only to active profiles"""
    def get_queryset(self):
        """Filter the default queryset for active users"""
        query = super(ActiveProfileManager, self).get_queryset()
        return query.filter(user__is_active=True)


@python_2_unicode_compatible
class ImagerProfile(models.Model):
    PHOTOGRAPHY_TYPE_CHOICES = (
        ('AB', 'Abstract'),
        ('AN', 'Animal'),
        ('AR', 'Artistic'),
        ('BE', 'Beauty'),
        ('FA', 'Fashion'),
        ('LA', 'Landscape'),
        ('NA', 'Nature'),
        ('PE', 'People'),
        ('TR', 'Travel'),
        ('WE', 'Wedding'),
    )
    user = models.OneToOneField(
        User,
        related_name='profile',
        null=False
    )

    camera = models.CharField(max_length=128, help_text='What is model of your camera?')
    address = models.TextField()
    website_url = models.URLField()
    photography_type = models.CharField(
        max_length=64,
        help_text="What type of photography do you primaliry make?",
        choices=PHOTOGRAPHY_TYPE_CHOICES
    )
    objects = models.Manager()
    active = ActiveProfileManager()

    def __str__(self):
        return self.user.get_full_name() or self.user.username

    def is_active(self):
        return self.user.is_active

@@ -1,20 +1,60 @@
+from __future__ import unicode_literals%0A
 from django.db impor
@@ -1025,16 +1025,46 @@
 gth=128,
+%0A                             
  help_te
@@ -1292,14 +1292,14 @@
 rima
-liry m
+rily t
 ake?

modify models