# Path: core/models.py
# class SummaryManager(models.Manager):
# class Summary(models.Model):
#     class Meta:
# class Topic(models.Model):
# class Comment(models.Model):
# class CommentTypeManager(models.Manager):
# class CommentType(models.Model):
# class CommentRelation(models.Model):
# class CommentResponse(models.Model):
#     def get_by_natural_key(self, text):
#     def __unicode__(self):
#     def natural_key(self):
#     def __unicode__(self):
#     def recursive_traverse(self, comment, level = 1):
#     def comments_to_show(self, cmp_function=comment_cmp):
#     def get_questions(self):
#     def burning_questions(self):
#     def burning_question_ids(self):
#     def question_is_burning(self, question):
#     def top_answers(self):
#     def popular_comments(self, num=5):
#     def user_responded_comment_ids(self, user_profile, response_type):
#     def user_voted_comment_ids(self, user_profile):
#     def __unicode__(self):
#     def num_responses(self, response_type):
#     def num_upvotes(self):
#     def opinion_level(self):
#     def get_related(self, relation_type):
#     def get_answers(self):
#     def num_related(self, relation_type):
#     def num_answers(self):
#     def is_answered(self):
#     def get_by_natural_key(self, name):
#     def __unicode__(self):
#     def natural_key(self):
#     def __unicode__(self):
#     COMMENT_RESPONSE_CHOICES = (
#         ('share', 'I share this concern'),
#         ('have', 'I have this question'),
#         ('like', 'I like this'),
#         ('concur', 'I concur'),
#         ('opinion', 'This answer is primarily opinion'),
#         ('accept', 'I accept this as the best answer'),
#     )
# 
# Path: tagger/models.py
# class Tag(models.Model):
#     """ Generic class to implement tagging. """
#     name = models.CharField(max_length=80, db_index=True, unique = True)
# 
#     def __unicode__(self):
#         return self.name
# 
# Path: clipper/models.py
# class Article(models.Model):
#     """ A news article.  These will be the sources for answers. """
#     url = models.URLField(verify_exists=False, unique = True) 
#     news_organization = models.ForeignKey("NewsOrganization", related_name='articles_created') 
#     source = models.ForeignKey("NewsOrganization", related_name = 'articles_sourced')
#     authors = models.ManyToManyField(UserProfile) 
#     title = models.CharField(max_length=200)
#     date_published = models.DateTimeField(null=True)
#     # But we'll probably not be tagging articles initially, just aggregating tags from
#     # related clips
#     tags = models.ManyToManyField(Tag, null=True) 
# 
#     def __unicode__(self):
#         return self.title
# 
# class NewsOrganization(models.Model):
#     """ A news organization that has produced an article. """
#     url = models.URLField(verify_exists=False) 
#     name = models.CharField(max_length=80)
#     users = models.ManyToManyField(UserProfile) 
#     feed_url = models.URLField(verify_exists=False) 
# 
#     def __unicode__(self):
#         return self.name
# 
# class Clip(models.Model):
#     """ Relevent text from an article.  """
#     tags = models.ManyToManyField(Tag, null=True) 
#     article = models.ForeignKey(Article) 
#     user = models.ForeignKey(UserProfile)
#     text = models.TextField()
#     date_created = models.DateTimeField(auto_now_add=True)
#     user_comments = models.TextField()
# 
#     def __unicode__(self):
#         return self.text[:80]


from django.contrib import admin
from core.models import Summary,Topic,Comment,UserProfile,\
    CommentType,CommentRelation,CommentResponse
from tagger.models import Tag
from clipper.models import Article, NewsOrganization, Clip
from django.contrib.auth.models import User

class CommentTypeAdmin(admin.ModelAdmin):
    pass

class TagAdmin(admin.ModelAdmin):
    search_fields = ['name']

class CommentRelationAdmin(admin.ModelAdmin):
    pass

class CommentResponseAdmin(admin.ModelAdmin):
    list_display = ('comment', 'user', 'type') 

class ArticleAdmin(admin.ModelAdmin):
    pass

class NewsOrganizationAdmin(admin.ModelAdmin):
    pass

class ClipAdmin(admin.ModelAdmin):
    pass

class UserProfileAdmin(admin.ModelAdmin):
    search_fields = ['user__username', 'user__email', 'user__first_name', 'user__last_name']

admin.site.register(Summary, SummaryAdmin)
admin.site.register(Topic, TopicAdmin)
admin.site.register(Comment, CommentAdmin)
admin.site.register(CommentType, CommentTypeAdmin)
admin.site.register(CommentRelation, CommentRelationAdmin)

# Path: core/models.py
# class SummaryManager(models.Manager):
# class Summary(models.Model):
#     class Meta:
# class Topic(models.Model):
# class Comment(models.Model):
# class CommentTypeManager(models.Manager):
# class CommentType(models.Model):
# class CommentRelation(models.Model):
# class CommentResponse(models.Model):
#     def get_by_natural_key(self, text):
#     def __unicode__(self):
#     def natural_key(self):
#     def __unicode__(self):
#     def recursive_traverse(self, comment, level = 1):
#     def comments_to_show(self, cmp_function=comment_cmp):
#     def get_questions(self):
#     def burning_questions(self):
#     def burning_question_ids(self):
#     def question_is_burning(self, question):
#     def top_answers(self):
#     def popular_comments(self, num=5):
#     def user_responded_comment_ids(self, user_profile, response_type):
#     def user_voted_comment_ids(self, user_profile):
#     def __unicode__(self):
#     def num_responses(self, response_type):
#     def num_upvotes(self):
#     def opinion_level(self):
#     def get_related(self, relation_type):
#     def get_answers(self):
#     def num_related(self, relation_type):
#     def num_answers(self):
#     def is_answered(self):
#     def get_by_natural_key(self, name):
#     def __unicode__(self):
#     def natural_key(self):
#     def __unicode__(self):
#     COMMENT_RESPONSE_CHOICES = (
#         ('share', 'I share this concern'),
#         ('have', 'I have this question'),
#         ('like', 'I like this'),
#         ('concur', 'I concur'),
#         ('opinion', 'This answer is primarily opinion'),
#         ('accept', 'I accept this as the best answer'),
#     )
# 
# Path: tagger/models.py
# class Tag(models.Model):
#     """ Generic class to implement tagging. """
#     name = models.CharField(max_length=80, db_index=True, unique = True)
# 
#     def __unicode__(self):
#         return self.name
# 
# Path: clipper/models.py
# class Article(models.Model):
#     """ A news article.  These will be the sources for answers. """
#     url = models.URLField(verify_exists=False, unique = True) 
#     news_organization = models.ForeignKey("NewsOrganization", related_name='articles_created') 
#     source = models.ForeignKey("NewsOrganization", related_name = 'articles_sourced')
#     authors = models.ManyToManyField(UserProfile) 
#     title = models.CharField(max_length=200)
#     date_published = models.DateTimeField(null=True)
#     # But we'll probably not be tagging articles initially, just aggregating tags from
#     # related clips
#     tags = models.ManyToManyField(Tag, null=True) 
# 
#     def __unicode__(self):
#         return self.title
# 
# class NewsOrganization(models.Model):
#     """ A news organization that has produced an article. """
#     url = models.URLField(verify_exists=False) 
#     name = models.CharField(max_length=80)
#     users = models.ManyToManyField(UserProfile) 
#     feed_url = models.URLField(verify_exists=False) 
# 
#     def __unicode__(self):
#         return self.name
# 
# class Clip(models.Model):
#     """ Relevent text from an article.  """
#     tags = models.ManyToManyField(Tag, null=True) 
#     article = models.ForeignKey(Article) 
#     user = models.ForeignKey(UserProfile)
#     text = models.TextField()
#     date_created = models.DateTimeField(auto_now_add=True)
#     user_comments = models.TextField()
# 
#     def __unicode__(self):
#         return self.text[:80]


# Path: core/admin.py
from django.contrib import admin
from core.models import Summary,Topic,Comment,UserProfile,\
    CommentType,CommentRelation,CommentResponse
from tagger.models import Tag
from clipper.models import Article, NewsOrganization, Clip
from django.contrib.auth.models import User


class CommentTypeAdmin(admin.ModelAdmin):
    pass

class TagAdmin(admin.ModelAdmin):
    search_fields = ['name']

class CommentRelationAdmin(admin.ModelAdmin):
    pass

class CommentResponseAdmin(admin.ModelAdmin):
    list_display = ('comment', 'user', 'type') 

class ArticleAdmin(admin.ModelAdmin):
    pass

class NewsOrganizationAdmin(admin.ModelAdmin):
    pass

class ClipAdmin(admin.ModelAdmin):
    pass

class UserProfileAdmin(admin.ModelAdmin):
    search_fields = ['user__username', 'user__email', 'user__first_name', 'user__last_name']

admin.site.register(Summary, SummaryAdmin)
admin.site.register(Topic, TopicAdmin)
admin.site.register(Comment, CommentAdmin)
admin.site.register(CommentType, CommentTypeAdmin)
admin.site.register(CommentRelation, CommentRelationAdmin)

admin.site.register(CommentResponse, CommentResponseAdmin)