from django.db import models

# Create your models here.
# 
from mongoengine import *
from blongo.settings import DBNAME
from django import forms

connect(DBNAME)

# Why Document?

class Post(Document):
    title = StringField(max_length=120, required=True)
    content = StringField(max_length=500, required=True)
    last_update = DateTimeField(required=True)


class UploadFileForm(forms.Form):
    title = forms.CharField(max_length=50)
    file  = forms.FileField()
