from django.db import models
from django.contrib.auth.models import User
# Create your models here.

class Pokedex(models.Model):
    pokemon_name = models.CharField(max_length=128, unique=True)
    pokemon_type = models.CharField(max_length=128)
    pokemon_image = models.CharField(max_length=128)

    def __unicode__(self):  #For Python 2, use __str__ on Python 3
        return self.pokemon_name

class UserProfile(models.Model):
    # This line is required. Links UserProfile to a User model instance.
    user = models.OneToOneField(User)

    # The additional attributes we wish to include.
    website = models.URLField(blank=True)
    picture = models.ImageField(upload_to='profile_images', blank=True)

    # Override the __unicode__() method to return out something meaningful!
    def __unicode__(self):
        return self.user.username