in stack overflow there's 2 questions this editor, , nobody answers!!!
so i'm asking how install django package project?? i've followed these steps already, have no errors, nothing, , still form stays same. why??
edit: heres model
from datetime import datetime django.db import models django.utils.translation import ugettext_lazy _, ugettext ckeditor.fields import richtextfield class newsletter(models.model): title = models.charfield( _(u'title'), max_length=200, help_text=_(u'newsletter title'), ) body = richtextfield() date = models.datefield( _(u'date'), help_text=_(u'set date when newsletter should send') ) class meta: ordering = ['title',]
forms.py
from models import newsletter, mail class newsletterform(forms.modelform): class meta: model = newsletter
view:
from newsletter.models import newsletter, mail newsletter.forms import newsletterform, mailform def newsletters_add(request): form = newsletterform() tpl = "form_newsletter.html" return render_to_response(tpl, requestcontext(request, { 'form': form, }))
all form outputed succesfully {{ form }} tag
settings.py (of project)
ckeditor_media_prefix = "/media/ckeditor/" ckeditor_upload_path = "/www/vhosts/sender/media/newsletter/uploads/" ckeditor_upload_prefix = "http://******/media/newsletter/uploads/" ckeditor_restrict_by_user = true ckeditor_configs = { 'default': { 'toolbar': 'basic', }, } installed_apps = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', # uncomment next line enable admin documentation: # 'django.contrib.admindocs', 'django.contrib.admin', #'tagging', 'debug_toolbar', 'ckeditor', 'mailer', 'newsletter' )
the media needed display widget correctly should stored in form's media
object. can output tag needed js in template {{ form.media }}
. admin should automatically, while in custom views have yourself... see django documentation on form media more information!
Comments
Post a Comment