import datetime

from django.db import models

import django_filepicker

class IntakeDoc(models.Model):
    fp_note = django_filepicker.models.FPFileField(upload_to='queue/%Y/%m/%j/',
                help_text=u"An uploaded file reference from Filepicker.io")
    form    = models.TextField(max_length=1024,
                help_text=u"A serilized version of the note data form")
    ip      = models.IPAddressField(blank=True, null=True,
                help_text=u"IP address of the uploader")

    uploaded_at     = models.DateTimeField(null=True, default=datetime.datetime.utcnow)

    class Meta:
        """ Sort files most recent first """
        ordering = ['-uploaded_at']


    def __unicode__(self):
        return u"{0} @ {1}".format(self.ip, self.uploaded_at)

    def convert_to_note(self):
        """ polymorph this object into a note.models.Note object  """
        pass

@@ -1,16 +1,105 @@
+#!/usr/bin/env python%0A# -*- coding:utf8 -*-%0A# Copyright (C) 2013  FinalsClub Foundation%0A%0A
 import datetime%0A
@@ -128,17 +128,16 @@
  models%0A
-%0A
 import d
@@ -158,519 +158,142 @@
 er%0A%0A
-class IntakeDoc(models.Model):%0A    fp_note = django_filepicker.models.FPFileField(upload_to='queue/%25Y/%25m/%25j/',%0A                help_text=u%22An uploaded file reference from Filepicker.io%22)%0A    form    = models.TextField(max_length=1024,%0A                help_text=u%22A serilized version of the note data form%22)%0A    ip      = models.IPAddressField(blank=True, null=True,%0A                help_text=u%22IP address of the uploader%22)%0A%0A    uploaded_at     = models.DateTimeField(null=True, default=datetime.datetime.utcnow)
+from karmaworld.apps.notes.models import Document%0A%0Aclass RawDocument(Document):%0A    is_processed = models.BooleanField(default=False)%0A
 %0A%0A  

refactor RawDocument model