from couchdb.schema import *
from couchdb.schema import View
from wiki.auth.models import User

class Page(Document):
    created_date       = DateTimeField()
    last_edited_date   = DateTimeField()
    title              = TextField()
    contents           = TextField()
    auth_user_editable = BooleanField()
    user               = User()

    get_pages  = View('pages', 
                      'function (doc) { emit(doc.title, doc);}',
                      name='all')

from couchdb.schema import *
from couchdb.schema import View

class Page(Document):
    created_date       = DateTimeField()
    last_edited_date   = DateTimeField()
    title              = TextField()
    contents           = TextField()
    auth_user_editable = BooleanField()
    user               = DictField()

    get_pages  = View('pages', 
                      'function (doc) { emit(doc.title, doc);}',
                      name='all')

Fix an unreferenced module bug
Fix an unreferenced module bug

  from couchdb.schema import *
  from couchdb.schema import View
- from wiki.auth.models import User
  
  class Page(Document):
      created_date       = DateTimeField()
      last_edited_date   = DateTimeField()
      title              = TextField()
      contents           = TextField()
      auth_user_editable = BooleanField()
-     user               = User()
+     user               = DictField()
  
      get_pages  = View('pages', 
                        'function (doc) { emit(doc.title, doc);}',
                        name='all')
  
Fix an unreferenced module bug
## Code Before:
from couchdb.schema import *
from couchdb.schema import View
from wiki.auth.models import User

class Page(Document):
    created_date       = DateTimeField()
    last_edited_date   = DateTimeField()
    title              = TextField()
    contents           = TextField()
    auth_user_editable = BooleanField()
    user               = User()

    get_pages  = View('pages', 
                      'function (doc) { emit(doc.title, doc);}',
                      name='all')

## Instruction:
Fix an unreferenced module bug
## Code After:
from couchdb.schema import *
from couchdb.schema import View

class Page(Document):
    created_date       = DateTimeField()
    last_edited_date   = DateTimeField()
    title              = TextField()
    contents           = TextField()
    auth_user_editable = BooleanField()
    user               = DictField()

    get_pages  = View('pages', 
                      'function (doc) { emit(doc.title, doc);}',
                      name='all')
