# -*- coding: utf-8 -*-
# Import chosenforms for pretty search forms
from chosen import forms as chosenforms
# Import the AbstractUser model
from django.contrib.auth.models import AbstractUser

# Import the basic Django ORM models and forms library
from django.db import models
from django import forms

# Import tags for searching
from taggit.models import Tag
from taggit.models import TagBase
from taggit.managers import TaggableManager

from django.utils.translation import ugettext_lazy as _

# Create seperate classes for each tag type that will be a foreign key reference from User
class TeachSkills(models.Model):
    skills = TaggableManager()

class LearnSkills(models.Model):
    skills = TaggableManager()

class UserManager(models.Manager):
    def create(self, name):
        new_user = Food()
        new_user.name = name
        new_user.teach = TeachSkills()
        new_user.teach.save()
        new_user.learn = LearnSkills()
        new_user.learn.save()
        new_user.save()
        return new_user

# Subclass AbstractUser
class User(AbstractUser):

    def __unicode__(self):
        return self.username
        
    objects = UserManager()
    teach = models.ForeignKey(TeachSkills, null=True)
    learn = models.ForeignKey(LearnSkills, null=True)
    short_bio = models.TextField()
    location = models.CharField(max_length=50)
@@ -1128,17 +1128,9 @@
 ame%0A
-        
 %0A
+
     
@@ -1292,24 +1292,24 @@
 TextField()%0A
-
     location
@@ -1342,8 +1342,604 @@
 ngth=50)
+%0A%0A    def save_skill_teach(self, tag, level):%0A        tag_skill = %22%25s %25s%22 %25(tag, level)%0A        tag = %22%25s%22 %25(tag)%0A        self.teach.skills.add(tag_skill)%0A        self.teach.skills.add(tag)%0A        return tag + %22 tag saved.%22   %0A%0A    def save_skill_learn(self, tag, level):%0A        tag_skill = %22%25s %25s%22 %25(tag, level)%0A        tag = %22%25s%22 %25(tag)%0A        self.learn.skills.add(tag_skill)%0A        self.learn.skills.add(tag)%0A        return tag + %22 tag saved.%22   %0A%0A    def get_skill_teach(self):%0A        return self.teach.skills.all()%0A%0A    def get_skill_learn(self):%0A        return self.learn.skills.all()

Create methods on User for POST and GET skilltags