Commits

Lukasz Balcerzak committed 007e8ce

Started using RestructuredTextAreaField as it have been finally implemented at django-richtemplates

  • Participants
  • Parent commits 48012de

Comments (0)

Files changed (3)

example_project/urls.py

 
     (r'^accounts/', include('registration.urls')),
     (r'^projector/', include('projector.urls')),
+    (r'^richtemplates/', include('richtemplates.urls')),
 
     (r'^admin_tools/', include('admin_tools.urls')),
     (r'^admin/', include(admin.site.urls)),

projector/forms.py

 import logging
 
 from django import forms
+from django.conf import settings
 from django.forms.models import modelformset_factory
 from django.forms.models import BaseModelFormSet
 from django.utils.translation import ugettext as _
         widget=forms.DateInput(attrs={'class': 'datepicker'}))
     watch_changes = forms.BooleanField(False, label=_('Watch for changes'),
         initial=True)
+    description = RestructuredTextAreaField(max_length=3000,
+        label=_('Description'))
 
     class Meta:
         model = Task
 class TaskEditForm(TaskForm):
     deadline = forms.DateField(required=False, label=_("Deadline"),
         widget=forms.DateInput(attrs={'class': 'datepicker'}))
-    description = RestructuredTextAreaField(max_length=3000,
-        label=_('Description'))
     comment = RestructuredTextAreaField(max_length=3000,
         label=_('Comment'), widget=forms.Textarea, required=False)
 

projector/views/project_task.py

 from django.http import HttpResponse
 from django.utils.translation import ugettext as _
 from django.utils.decorators import method_decorator
+from django.utils.simplejson import dumps
 
 from projector.models import Task
 from projector.forms import TaskForm, TaskEditForm
 
         return self.context
 
+
 class TaskWatchView(ProjectView):
     """
     Makes request's user watching this task.