# Copyright (C) 2012 FinalsClub Foundation
from django.forms import ModelForm
+from django.forms import TextInput
from karmaworld.apps.notes.models import Note
class NoteForm(ModelForm):
class Meta:
model = Note
- fields = ('name', 'tags', 'desc',)
+ fields = ('name', 'tags', 'year',)
+ widgets = {
+ 'name': TextInput()
+ }
name = models.CharField(max_length=255, blank=True, null=True)
slug = models.SlugField(max_length=255, null=True)
+ year = models.IntegerField(blank=True, null=True,
+ default=datetime.datetime.utcnow().year)
desc = models.TextField(max_length=511, blank=True, null=True)
uploaded_at = models.DateTimeField(null=True, default=datetime.datetime.utcnow)